fix: improve app hiding functionality
This commit is contained in:
parent
b4da701080
commit
5fed84c04d
1 changed files with 9 additions and 2 deletions
|
@ -274,10 +274,17 @@ function createMainWindow() {
|
||||||
win.setMenuBarVisibility(false);
|
win.setMenuBarVisibility(false);
|
||||||
|
|
||||||
win.on("close", e => {
|
win.on("close", e => {
|
||||||
if (isQuitting || Settings.store.minimizeToTray === false || Settings.store.tray === false) return;
|
if (
|
||||||
|
isQuitting ||
|
||||||
|
(process.platform !== "darwin" &&
|
||||||
|
(Settings.store.minimizeToTray === false || Settings.store.tray === false))
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
win.hide();
|
|
||||||
|
if (process.platform === "darwin") app.hide();
|
||||||
|
else win.hide();
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue