From 0ff0b269b12e3433510b2575c6044dd0b2ca0733 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 12 Sep 2016 10:26:40 -0600 Subject: [PATCH] Don't wait for spec windows to save state Since spec windows don't register handlers for the IPC messages requested window state to be saved, the promise never resolves and the close button needs to be clicked twice. To avoid this, we'll just resolve the promise immediately in a spec window so we can proceed to close it. --- src/main-process/atom-window.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main-process/atom-window.coffee b/src/main-process/atom-window.coffee index 236fbf8e0..92fc19804 100644 --- a/src/main-process/atom-window.coffee +++ b/src/main-process/atom-window.coffee @@ -178,6 +178,9 @@ class AtomWindow @unloading = false saveState: -> + if @isSpecWindow() + return Promise.resolve() + @lastSaveStatePromise = new Promise (resolve) => callback = (event) => if BrowserWindow.fromWebContents(event.sender) is @browserWindow