mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
fix: save bounds only when not fullscreen and not maximized
This commit is contained in:
+5
-2
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user