small fixes to tray and closing windows

This commit is contained in:
zadam 2022-08-04 21:19:57 +02:00
parent 3c1f826ead
commit 563808144e
2 changed files with 4 additions and 4 deletions

View file

@ -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 () => {

View file

@ -62,6 +62,7 @@ const updateTrayMenu = () => {
mainWindow.hide();
} else {
mainWindow.show();
mainWindow.focus();
}
}
},