   unloadEditorWindow: ->
     return if not @project
 
+    @storeWindowBackground()
     @state.grammars = @grammars.serialize()
     @state.project = @project.serialize()
     @state.workspace = @workspace.serialize()

        deprecate "The atom.syntax global is deprecated. Use atom.grammars instead."
        @grammars

    @disposables.add @packages.onDidActivateInitialPackages =>
      @watchThemes()
      @storeWindowBackground()

    Project = require './project'
    TextBuffer = require 'text-buffer'

      # Only reload stylesheets from non-theme packages
      for pack in @packages.getActivePackages() when pack.getType() isnt 'theme'
        pack.reloadStylesheets?()
      return

  # Notify the browser project of the window's current project path
