Make sure the 'closed' event is emitted before 'window-all-closed'.
This commit is contained in:
parent
ed576dcc68
commit
1900ad4cb9
2 changed files with 7 additions and 2 deletions
|
@ -28,4 +28,9 @@ atom.browserMainParts.preMainMessageLoopRun = function() {
|
|||
|
||||
this.setTitle('Atom Shell - ' + title);
|
||||
});
|
||||
|
||||
mainWindow.on('closed', function() {
|
||||
console.log('closed');
|
||||
mainWindow = null;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -157,9 +157,9 @@ void NativeWindow::NotifyWindowClosed() {
|
|||
return;
|
||||
|
||||
is_closed_ = true;
|
||||
WindowList::RemoveWindow(this);
|
||||
|
||||
FOR_EACH_OBSERVER(NativeWindowObserver, observers_, OnWindowClosed());
|
||||
|
||||
WindowList::RemoveWindow(this);
|
||||
}
|
||||
|
||||
// Window opened by window.open.
|
||||
|
|
Loading…
Reference in a new issue