mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
LibGUI: Don't ask WindowServer to destroy windows during app teardown
This makes teardown faster since we don't have to wait for responses to each destroy_window request. It also avoids doing IPC during teardown, which is a general source of problems.
This commit is contained in:
parent
24ea6a8ce7
commit
60a245b065
Notes:
sideshowbarker
2024-07-18 05:01:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/60a245b065e
1 changed files with 6 additions and 0 deletions
|
@ -198,6 +198,12 @@ void Window::hide()
|
|||
{
|
||||
if (!is_visible())
|
||||
return;
|
||||
|
||||
// NOTE: Don't bother asking WindowServer to destroy windows during application teardown.
|
||||
// All our windows will be automatically garbage-collected by WindowServer anyway.
|
||||
if (GUI::Application::in_teardown())
|
||||
return;
|
||||
|
||||
auto destroyed_window_ids = WindowServerConnection::the().destroy_window(m_window_id);
|
||||
server_did_destroy();
|
||||
|
||||
|
|
Loading…
Reference in a new issue