diff --git a/browser/default_app/main.js b/browser/default_app/main.js index e8daddefc173..50807df33c57 100644 --- a/browser/default_app/main.js +++ b/browser/default_app/main.js @@ -28,4 +28,9 @@ atom.browserMainParts.preMainMessageLoopRun = function() { this.setTitle('Atom Shell - ' + title); }); + + mainWindow.on('closed', function() { + console.log('closed'); + mainWindow = null; + }); } diff --git a/browser/native_window.cc b/browser/native_window.cc index cbea4a75fb74..179a6aad3c9b 100644 --- a/browser/native_window.cc +++ b/browser/native_window.cc @@ -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.