diff --git a/src/browser/atom-application.coffee b/src/browser/atom-application.coffee index 7b3694947..720e0f84d 100644 --- a/src/browser/atom-application.coffee +++ b/src/browser/atom-application.coffee @@ -208,7 +208,6 @@ class AtomApplication @openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md')) app.on 'before-quit', => - @saveState(false) @quitting = true app.on 'will-quit', => diff --git a/src/browser/atom-window.coffee b/src/browser/atom-window.coffee index 721eb68a6..8425171b7 100644 --- a/src/browser/atom-window.coffee +++ b/src/browser/atom-window.coffee @@ -119,6 +119,9 @@ class AtomWindow false handleEvents: -> + @browserWindow.on 'close', -> + global.atomApplication.saveState(false) + @browserWindow.on 'closed', => global.atomApplication.removeWindow(this)