From 01e62d607d39059ddcbc0d84e2f0606e24b6f126 Mon Sep 17 00:00:00 2001 From: Brian Clifton Date: Wed, 10 May 2017 23:53:22 -0700 Subject: [PATCH] saveAppState needs to be called to perform the quit (was only missing from the lastWindowClosed case) Unintentionally introduced with https://github.com/brave/browser-laptop/commit/40abc0c780050eb0b8dd42c15065d1c784268b47#diff-2018087f584c4398b5c3a23fc0e5f9dbR172 True needs to be passed, because the last known window state is saved, so receivedAllWindows is always false Fixes https://github.com/brave/browser-laptop/issues/8629 Auditors: @bridiver --- app/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/index.js b/app/index.js index 91976ab5f94..a7534ee1b29 100644 --- a/app/index.js +++ b/app/index.js @@ -181,6 +181,7 @@ const initiateSessionStateSave = () => { // quit triggered by window-all-closed should save last window state if (lastWindowClosed && lastWindowState) { perWindowState.push(lastWindowState) + saveAppState(true) } else if (BrowserWindow.getAllWindows().length > 0) { ++requestId BrowserWindow.getAllWindows().forEach((win) => win.webContents.send(messages.REQUEST_WINDOW_STATE, requestId))