mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user