]> khamidou — GitHub mirrors - electron.git/commitdiff
Emit browser-window-created when window is created
authorCheng Zhao <zcbenz@gmail.com>
Mon, 14 Sep 2015 09:02:24 +0000 (17:02 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Mon, 14 Sep 2015 09:02:24 +0000 (17:02 +0800)
atom/browser/api/lib/browser-window.coffee

index 283e99641f477910ce9943767654158ecaba3bc3..2a92cfc55f8808b35df523944cba76b65e725dce 100644 (file)
@@ -45,6 +45,9 @@ BrowserWindow::_init = ->
   @on 'focus', (event) =>
     app.emit 'browser-window-focus', event, this
 
+  # Notify the creation of the window.
+  app.emit 'browser-window-created', {}, this
+
 BrowserWindow.getFocusedWindow = ->
   windows = BrowserWindow.getAllWindows()
   return window for window in windows when window.isFocused()