diff --git a/electron.js b/electron.js index cc3f86646..9ad294b85 100644 --- a/electron.js +++ b/electron.js @@ -14,12 +14,11 @@ appIconService.installLocalAppIcon(); require('electron-dl')({ saveAs: true }); app.on('window-all-closed', () => { - if (process.platform !== 'darwin') { + if (process.platform === 'win32') { + app.exit(0); // attempt to fix the issue when app.quit() won't terminate processes on windows + } else { app.quit(); } - else if (process.platform === 'win32') { - app.exit(0); // attempt to fix the issue when app.quite() won't terminate processes on windows - } }); app.on('ready', async () => { diff --git a/src/services/tray.js b/src/services/tray.js index 7493e5c8b..137bf4cef 100644 --- a/src/services/tray.js +++ b/src/services/tray.js @@ -62,6 +62,7 @@ const updateTrayMenu = () => { mainWindow.hide(); } else { mainWindow.show(); + mainWindow.focus(); } } },