diff --git a/atom/browser/window_list.cc b/atom/browser/window_list.cc index 374389e0a78..2ab0b24cf50 100644 --- a/atom/browser/window_list.cc +++ b/atom/browser/window_list.cc @@ -81,6 +81,9 @@ void WindowList::RemoveObserver(WindowListObserver* observer) { // static void WindowList::CloseAllWindows() { WindowVector windows = GetInstance()->windows_; +#if defined(OS_MACOSX) + std::reverse(windows.begin(), windows.end()); +#endif for (const auto& window : windows) if (!window->IsClosed()) window->Close();