fix mac close button behaviour

This commit is contained in:
Labhansh Agrawal 2021-01-07 17:14:50 +05:30 committed by Benjamin Staneck
parent fde0ffda43
commit a1d80372d5

View file

@ -164,12 +164,6 @@ app.on('ready', () =>
windowSet.delete(hwin); windowSet.delete(hwin);
}); });
hwin.on('closed', () => {
if (process.platform !== 'darwin' && windowSet.size === 0) {
app.quit();
}
});
return hwin; return hwin;
} }
@ -188,6 +182,12 @@ app.on('ready', () =>
} }
}); });
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
const makeMenu = () => { const makeMenu = () => {
const menu = plugins.decorateMenu(AppMenu.createMenu(createWindow, plugins.getLoadedPluginVersions)); const menu = plugins.decorateMenu(AppMenu.createMenu(createWindow, plugins.getLoadedPluginVersions));