Emit browser-window-created when window is created
This commit is contained in:
parent
9e7b67802c
commit
c346fcb326
1 changed files with 3 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue