🐛 Install WindowEventHandler in ctor

This commit is contained in:
Antonio Scandurra
2015-10-13 12:33:58 +02:00
parent 3ac0656a26
commit e51bad5618
2 changed files with 2 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ describe "WindowEventHandler", ->
[projectPath, windowEventHandler] = []
beforeEach ->
atom.windowEventHandler.unsubscribe()
spyOn(atom, 'hide')
initialPath = atom.project.getPaths()[0]
spyOn(atom, 'getLoadSettings').andCallFake ->

View File

@@ -194,6 +194,7 @@ class AtomEnvironment extends Model
@registerDefaultViewProviders()
@installUncaughtErrorHandler()
@windowEventHandler = new WindowEventHandler(this)
setConfigSchema: ->
@config.setSchema null, {type: 'object', properties: _.clone(require('./config-schema'))}
@@ -597,7 +598,6 @@ class AtomEnvironment extends Model
@setBodyPlatformClass()
document.head.appendChild(@styles.buildStylesElement())
@windowEventHandler = new WindowEventHandler(this)
@packages.loadPackages()