mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
Merge pull request #10366 from syohex/window-close-order
Close window in order from newer one on macOS
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user