Make sure the 'closed' event is emitted before 'window-all-closed'.

This commit is contained in:
Cheng Zhao 2013-05-07 16:20:52 +08:00
parent ed576dcc68
commit 1900ad4cb9
2 changed files with 7 additions and 2 deletions

View file

@ -28,4 +28,9 @@ atom.browserMainParts.preMainMessageLoopRun = function() {
this.setTitle('Atom Shell - ' + title);
});
mainWindow.on('closed', function() {
console.log('closed');
mainWindow = null;
});
}

View file

@ -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.