From ea92c73ece8ae87346706065a96557f1238c86e1 Mon Sep 17 00:00:00 2001 From: Alex Brazier Date: Wed, 16 Aug 2017 22:35:35 +0100 Subject: [PATCH] Fix minimised start on Windows --- src/background.custom.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/background.custom.js b/src/background.custom.js index eb2bc3ed98..8125193a22 100644 --- a/src/background.custom.js +++ b/src/background.custom.js @@ -114,13 +114,17 @@ export function afterMainWindow (mainWindow) { app.on('activate', function () { mainWindow.show(); + mainWindowState.saveState(mainWindow); }); mainWindow.webContents.on('will-navigate', function (event) { event.preventDefault(); }); - ipcMain.on('focus', () => mainWindow.show()); + ipcMain.on('focus', () => { + mainWindow.show(); + mainWindowState.saveState(mainWindow); + }); ipcMain.on('getSystemIdleTime', (event) => { event.returnValue = idle.getIdleTime();