mirror of
https://github.com/electron/electron.git
synced 2026-02-02 19:25:41 -05:00
Make sure the 'closed' event is emitted before 'window-all-closed'.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user