diff --git a/lib/main-window.js b/lib/main-window.js index a6d129fce..fa54d5ce0 100644 --- a/lib/main-window.js +++ b/lib/main-window.js @@ -7,9 +7,11 @@ const config = new Config() const _ = require('lodash') var showMenu = process.platform !== 'win32' -const windowSize = config.get('windowsize') || { width: 1080, height: 720 } +const windowSize = config.get('windowsize') || { x: null, y: null, width: 1080, height: 720 } const mainWindow = new BrowserWindow({ + x: windowSize.x, + y: windowSize.y, width: windowSize.width, height: windowSize.height, minWidth: 500, @@ -59,6 +61,7 @@ if (process.platform === 'darwin') { } mainWindow.on('resize', _.throttle(storeWindowSize, 500)) +mainWindow.on('move', _.throttle(storeWindowSize, 500)) function storeWindowSize () { try {