         app.quit()
         return
     @windows.splice(@windows.indexOf(window), 1)
-    @saveState() unless window.isSpec
+    @saveState(true) unless window.isSpec
 
   # Public: Adds the {AtomWindow} to the global window list.
   addWindow: (window) ->


    unless window.isSpec
      focusHandler = => @lastFocusedWindow = window
      blurHandler = => @saveState()
      window.browserWindow.on 'focus', focusHandler
      window.browserWindow.on 'blur', blurHandler
      window.browserWindow.once 'closed', =>
        @lastFocusedWindow = null if window is @lastFocusedWindow
        window.browserWindow.removeListener 'focus', focusHandler
        window.browserWindow.removeListener 'blur', blurHandler
      window.browserWindow.webContents.once 'did-finish-load', => @saveState()

  # Creates server to listen for additional atom application launches.
  #

    @openPathOnEvent('application:open-license', path.join(process.resourcesPath, 'LICENSE.md'))

    app.on 'before-quit', =>
      @saveState(false)
      @quitting = true

    app.on 'will-quit', =>
