Use subscribe for window focus event handler

This commit is contained in:
Kevin Sawicki
2013-01-11 10:37:33 -08:00
parent 170b50ddf0
commit eaa164e109

View File

@@ -80,7 +80,7 @@ class RootView extends View
handleEvents: ->
@command 'toggle-dev-tools', => atom.toggleDevTools()
@on 'focus', (e) => @handleFocus(e)
$(window).on 'focus', (e) =>
@subscribe $(window), 'focus', (e) =>
@handleFocus(e) if document.activeElement is document.body
@on 'root-view:active-path-changed', (e, path) =>