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

Close window in order from newer one on macOS
This commit is contained in:
Cheng Zhao 2017-09-12 16:22:38 +09:00 committed by GitHub
commit 59cadf9e4b

View file

@ -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();