From 03887f9d1bce2c952fb1866e7ef436387f391515 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)