From fbd5ffc1987a31e7913174eb90577574d404ed1c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 4 Nov 2019 18:02:33 +0000 Subject: [PATCH] Fix close window behaviour on Macos --- electron_app/src/electron-main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron_app/src/electron-main.js b/electron_app/src/electron-main.js index 48a425c917..7e65c53470 100644 --- a/electron_app/src/electron-main.js +++ b/electron_app/src/electron-main.js @@ -393,7 +393,7 @@ app.on('ready', () => { }); mainWindow.on('close', (e) => { // If we are not quitting and have a tray icon then minimize to tray - if (!global.appQuitting && tray.hasTray()) { + if (!global.appQuitting && (tray.hasTray() || process.platform === 'darwin')) { // On Mac, closing the window just hides it // (this is generally how single-window Mac apps // behave, eg. Mail.app)