Skip to content

Commit a21fbb8

Browse files
committed
fix get window size on Windows
1 parent 1e8c090 commit a21fbb8

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/helpers/window-settings.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,12 @@ const storageSet = promisify(storage.set)
77

88
export const saveWindowSettings = async window => {
99
if (!window) return
10-
11-
const [width, height] = window.getSize()
12-
const [x, y] = window.getPosition()
10+
const bounds = window.getContentBounds()
1311
const settings = await storageGet('settings')
1412

1513
if (!settings) return
1614

17-
set(settings, 'windowParams', {
18-
width,
19-
height,
20-
x,
21-
y,
22-
})
15+
set(settings, 'windowParams', bounds)
2316

2417
return storageSet('settings', settings)
2518
}

0 commit comments

Comments
 (0)