disable gpu before app inits (#1654)

Co-authored-by: = <=>
This commit is contained in:
Guillermo Vayá
2021-07-13 18:23:05 +02:00
committed by GitHub
parent ee1b393e3d
commit 26ca8ccefc
2 changed files with 9 additions and 7 deletions

View File

@@ -157,6 +157,12 @@ async function initializeConfig() {
config.on('synchronize', handleConfigSynchronize);
config.on('darkModeChange', handleDarkModeChange);
handleConfigUpdate(configData);
// can only call this before the app is ready
if (config.enableHardwareAcceleration === false) {
app.disableHardwareAcceleration();
}
resolve();
});
config.init();
@@ -194,11 +200,6 @@ function initializeBeforeAppReady() {
process.chdir(expectedPath);
}
// can only call this before the app is ready
if (config.enableHardwareAcceleration === false) {
app.disableHardwareAcceleration();
}
refreshTrayImages(config.trayIconTheme);
// If there is already an instance, quit this one