From a1d80372d53e0d264ab9e5a003b66d337f1f0343 Mon Sep 17 00:00:00 2001 From: Labhansh Agrawal Date: Thu, 7 Jan 2021 17:14:50 +0530 Subject: [PATCH] fix mac close button behaviour --- app/index.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/index.ts b/app/index.ts index c629689a..f874dbf6 100644 --- a/app/index.ts +++ b/app/index.ts @@ -164,12 +164,6 @@ app.on('ready', () => windowSet.delete(hwin); }); - hwin.on('closed', () => { - if (process.platform !== 'darwin' && windowSet.size === 0) { - app.quit(); - } - }); - return hwin; } @@ -188,6 +182,12 @@ app.on('ready', () => } }); + app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit(); + } + }); + const makeMenu = () => { const menu = plugins.decorateMenu(AppMenu.createMenu(createWindow, plugins.getLoadedPluginVersions));