Fix window listeners bug
This commit is contained in:
parent
2733727a40
commit
a516550c9f
1 changed files with 2 additions and 1 deletions
|
@ -409,6 +409,8 @@ function createMainWindow() {
|
||||||
}));
|
}));
|
||||||
win.setMenuBarVisibility(false);
|
win.setMenuBarVisibility(false);
|
||||||
|
|
||||||
|
win.on("ready-to-show", () => initWindowBoundsListeners(win));
|
||||||
|
|
||||||
win.on("close", e => {
|
win.on("close", e => {
|
||||||
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;
|
const useTray = !isDeckGameMode && Settings.store.minimizeToTray !== false && Settings.store.tray !== false;
|
||||||
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
|
if (isQuitting || (process.platform !== "darwin" && !useTray)) return;
|
||||||
|
@ -423,7 +425,6 @@ function createMainWindow() {
|
||||||
|
|
||||||
if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault());
|
if (Settings.store.staticTitle) win.on("page-title-updated", e => e.preventDefault());
|
||||||
|
|
||||||
initWindowBoundsListeners(win);
|
|
||||||
if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win);
|
if (!isDeckGameMode && (Settings.store.tray ?? true) && process.platform !== "darwin") initTray(win);
|
||||||
initMenuBar(win);
|
initMenuBar(win);
|
||||||
makeLinksOpenExternally(win);
|
makeLinksOpenExternally(win);
|
||||||
|
|
Reference in a new issue