summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorRobin Burchell <robin+git@viroteck.net>2019-07-17 20:57:27 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-17 21:03:01 +0200
commit7a53096e8dd2a4d72903589ddc8d0855e41947b7 (patch)
tree11d9b6dd98c5bf18a8d394d243df4ce8e54b5518 /Applications
parent4adbddeb361069711cca305cfda01741c72342fe (diff)
downloadserenity-7a53096e8dd2a4d72903589ddc8d0855e41947b7.zip
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 ;-)
Diffstat (limited to 'Applications')
-rw-r--r--Applications/Taskbar/TaskbarButton.cpp2
-rw-r--r--Applications/Taskbar/WindowList.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Applications/Taskbar/TaskbarButton.cpp b/Applications/Taskbar/TaskbarButton.cpp
index 3fd1f336e9..2838ebcf22 100644
--- a/Applications/Taskbar/TaskbarButton.cpp
+++ b/Applications/Taskbar/TaskbarButton.cpp
@@ -20,5 +20,5 @@ void TaskbarButton::context_menu_event(GContextMenuEvent&)
request.wm.client_id = m_identifier.client_id();
request.wm.window_id = m_identifier.window_id();
request.wm.position = screen_relative_rect().location();
- GEventLoop::current().connection().post_message_to_server(request);
+ GWindowServerConnection::the().post_message_to_server(request);
}
diff --git a/Applications/Taskbar/WindowList.cpp b/Applications/Taskbar/WindowList.cpp
index 4ca85919eb..51f5993ac3 100644
--- a/Applications/Taskbar/WindowList.cpp
+++ b/Applications/Taskbar/WindowList.cpp
@@ -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;