fix: save bounds only when not fullscreen and not maximized

This commit is contained in:
purocean
2022-07-29 22:17:38 +08:00
parent c6588caf7c
commit 0875e9e53d
+5 -2
View File
@@ -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)
}
}