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

LibGUI: Revert GWindowServerConnection to being a singleton

This was a mistake, of course. Nested event loops don't need (or want)
independent server connections.

We initialize the connection early in GEventLoop for e.g. users that
want to get the size of a GDesktop before the connection has been
established.

Bug noticed by Andreas, introduced by me ;-)
This commit is contained in:
Robin Burchell 2019-07-17 20:57:27 +02:00 committed by Andreas Kling
parent 4adbddeb36
commit 7a53096e8d
10 changed files with 50 additions and 40 deletions

View file

@ -35,7 +35,7 @@ Window& WindowList::ensure_window(const WindowIdentifier& identifier)
}
message.wm.client_id = identifier.client_id();
message.wm.window_id = identifier.window_id();
bool success = GEventLoop::current().connection().post_message_to_server(message);
bool success = GWindowServerConnection::the().post_message_to_server(message);
ASSERT(success);
};
auto& window_ref = *window;