WindowServer: Tear down WSClientConnection asynchronously

If something goes wrong when trying to message a windowing client,
we now tear it down *on next event loop* instead of immediately.

This avoids having to deal with disconnected windows suddenly
disappearing from window lists while looping over them.
This commit is contained in:
Andreas Kling 2020-01-25 10:21:44 +01:00
parent 74829cdb75
commit 60d5b06e21
Notes: sideshowbarker 2024-07-19 09:50:35 +09:00

View file

@ -81,7 +81,9 @@ WSClientConnection::~WSClientConnection()
void WSClientConnection::die()
{
s_connections->remove(client_id());
deferred_invoke([this](auto&) {
s_connections->remove(client_id());
});
}
void WSClientConnection::notify_about_new_screen_rect(const Rect& rect)