Merge pull request #10366 from syohex/window-close-order
Close window in order from newer one on macOS
This commit is contained in:
commit
59cadf9e4b
1 changed files with 3 additions and 0 deletions
|
@ -81,6 +81,9 @@ void WindowList::RemoveObserver(WindowListObserver* observer) {
|
||||||
// static
|
// static
|
||||||
void WindowList::CloseAllWindows() {
|
void WindowList::CloseAllWindows() {
|
||||||
WindowVector windows = GetInstance()->windows_;
|
WindowVector windows = GetInstance()->windows_;
|
||||||
|
#if defined(OS_MACOSX)
|
||||||
|
std::reverse(windows.begin(), windows.end());
|
||||||
|
#endif
|
||||||
for (const auto& window : windows)
|
for (const auto& window : windows)
|
||||||
if (!window->IsClosed())
|
if (!window->IsClosed())
|
||||||
window->Close();
|
window->Close();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue