1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

WindowServer: Add request_close_fragile_windows() helper

This commit is contained in:
thankyouverycool 2022-11-17 10:31:53 -05:00 committed by Andreas Kling
parent c23adeaaf7
commit 35bd79701c
2 changed files with 23 additions and 2 deletions

View file

@ -2388,4 +2388,14 @@ Window* WindowManager::foremost_popup_window(WindowStack& stack)
return popup_window;
}
void WindowManager::request_close_fragile_windows(WindowStack& stack)
{
for_each_visible_window_from_back_to_front([&](Window& window) {
if (is_fragile_window_type(window.type()))
window.request_close();
return IterationDecision::Continue;
},
&stack);
}
}