mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +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:
parent
4adbddeb36
commit
7a53096e8d
10 changed files with 50 additions and 40 deletions
|
@ -17,6 +17,7 @@ public:
|
|||
{}
|
||||
|
||||
void handshake() override;
|
||||
static GWindowServerConnection& the();
|
||||
|
||||
private:
|
||||
void postprocess_bundles(Vector<IncomingMessageBundle>& m_unprocessed_bundles) override;
|
||||
|
@ -39,9 +40,6 @@ public:
|
|||
|
||||
static GEventLoop& current() { return static_cast<GEventLoop&>(CEventLoop::current()); }
|
||||
|
||||
GWindowServerConnection& connection() { return m_connection; }
|
||||
|
||||
private:
|
||||
void process_unprocessed_bundles();
|
||||
GWindowServerConnection m_connection;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue