Close window in order from newer one on macOS
A parent window is not closed if a child modal window still exists. So a child window should be closed before parent window closed.
This commit is contained in:
parent
87d4666648
commit
55f2b524e7
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…
Reference in a new issue