more standard window-all-closed handling

This commit is contained in:
zadam 2022-09-18 10:05:49 +02:00
parent 47235965d5
commit 552d872047

View File

@ -13,11 +13,12 @@ appIconService.installLocalAppIcon();
require('electron-dl')({ saveAs: true }); require('electron-dl')({ saveAs: true });
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => { app.on('window-all-closed', () => {
if (process.platform === 'win32') { if (process.platform !== 'darwin') {
app.exit(0); // attempt to fix the issue when app.quit() won't terminate processes on windows app.quit()
} else {
app.quit();
} }
}); });