From 0875e9e53dd74bae9a62a9057a930db45d4f3bf8 Mon Sep 17 00:00:00 2001 From: purocean Date: Fri, 29 Jul 2022 22:17:38 +0800 Subject: [PATCH] fix: save bounds only when not fullscreen and not maximized --- src/main/app.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/app.ts b/src/main/app.ts index 71d07a99..de265793 100644 --- a/src/main/app.ts +++ b/src/main/app.ts @@ -92,9 +92,12 @@ const restoreWindowBounds = () => { const saveWindowBounds = () => { if (win) { - const bounds = win.getBounds() const fullscreen = win.isFullScreen() - if (!fullscreen) { + const maximized = win.isMaximized() + + // save bounds only when not fullscreen and not maximized + if (!fullscreen && !maximized) { + const bounds = win.getBounds() store.set('window.bounds', bounds) } }