diff --git a/src/main/mainWindow.ts b/src/main/mainWindow.ts index 5550c6b..872ba6c 100644 --- a/src/main/mainWindow.ts +++ b/src/main/mainWindow.ts @@ -283,10 +283,13 @@ function createMainWindow() { win.setMenuBarVisibility(false); win.on("close", e => { - if (isQuitting || Settings.store.minimizeToTray === false || Settings.store.tray === false) return; + const useTray = Settings.store.minimizeToTray && Settings.store.tray; + if (isQuitting || (process.platform !== "darwin" && !useTray)) return; e.preventDefault(); - win.hide(); + + if (process.platform === "darwin") app.hide(); + else win.hide(); return false; });