Browse Source

Merge pull request #10366 from syohex/window-close-order

Close window in order from newer one on macOS
Cheng Zhao 7 years ago
parent
commit
59cadf9e4b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      atom/browser/window_list.cc

+ 3 - 0
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();