From 543e9c44ef655994b60b790256be7470f662c2f7 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Mon, 11 Jun 2018 12:03:10 +0530 Subject: [PATCH] ELECTRON-549: support not quitting app on mac upon closing window (#394) --- js/main.js | 4 +++- js/windowMgr.js | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 00662423..d6ab8f6f 100644 --- a/js/main.js +++ b/js/main.js @@ -169,7 +169,9 @@ app.on('ready', () => { * In which case we quit the app */ app.on('window-all-closed', function() { - app.quit(); + if (!isMac) { + app.quit(); + } }); /** diff --git a/js/windowMgr.js b/js/windowMgr.js index 793d97de..fcbfbb1b 100644 --- a/js/windowMgr.js +++ b/js/windowMgr.js @@ -289,7 +289,9 @@ function doCreateMainWindow(initialUrl, initialBounds, isCustomTitleBar) { e.preventDefault(); mainWindow.minimize(); } else { - app.quit(); + if (!isMac) { + app.quit(); + } } });