From 563808144e90aec8665cd5b8a4d381214114ea6e Mon Sep 17 00:00:00 2001 From: zadam Date: Thu, 4 Aug 2022 21:19:57 +0200 Subject: [PATCH] small fixes to tray and closing windows --- electron.js | 7 +++---- src/services/tray.js | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) 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(); } } },