mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 00:29:15 +00:00
Destroy all remaining windows in a process when it dies.
This commit is contained in:
parent
3a4207b863
commit
5c25f0c4db
Notes:
sideshowbarker
2024-07-19 15:55:07 +09:00
Author: https://github.com/awesomekling
Commit: 5c25f0c4db
7 changed files with 30 additions and 6 deletions
|
@ -257,3 +257,12 @@ int Process::gui$set_global_cursor_tracking_enabled(int window_id, bool enabled)
|
|||
window.set_global_cursor_tracking_enabled(enabled);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Process::destroy_all_windows()
|
||||
{
|
||||
for (auto& it : m_windows) {
|
||||
auto message = make<WSMessage>(WSMessage::WM_DestroyWindow);
|
||||
WSMessageLoop::the().post_message(it.value.leakPtr(), move(message), true);
|
||||
}
|
||||
m_windows.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue