From a21fbb89ce2b2cb1d8dbcee671e743f621c64aa4 Mon Sep 17 00:00:00 2001 From: KMcB Date: Tue, 6 Aug 2019 22:26:54 +0200 Subject: [PATCH] fix get window size on Windows --- src/helpers/window-settings.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/helpers/window-settings.js b/src/helpers/window-settings.js index c87c85bc..608653dd 100644 --- a/src/helpers/window-settings.js +++ b/src/helpers/window-settings.js @@ -7,19 +7,12 @@ const storageSet = promisify(storage.set) export const saveWindowSettings = async window => { if (!window) return - - const [width, height] = window.getSize() - const [x, y] = window.getPosition() + const bounds = window.getContentBounds() const settings = await storageGet('settings') if (!settings) return - set(settings, 'windowParams', { - width, - height, - x, - y, - }) + set(settings, 'windowParams', bounds) return storageSet('settings', settings) }