Save the state before the browser window is closed

This commit is contained in:
Wliu
2015-12-14 17:31:27 -05:00
parent ed96ac7daf
commit 74e830358d
2 changed files with 3 additions and 1 deletions

View File

@@ -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', =>

View File

@@ -119,6 +119,9 @@ class AtomWindow
false
handleEvents: ->
@browserWindow.on 'close', ->
global.atomApplication.saveState(false)
@browserWindow.on 'closed', =>
global.atomApplication.removeWindow(this)