summaryrefslogtreecommitdiff
path: root/LibGUI/GEventLoop.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-04-03 17:22:14 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-04-03 17:22:14 +0200
commit318db1e48e49a6eec5a27355e39a38cbc243475c (patch)
treecf4eeb98b4a27a87a1b5cf4953b3527979390a2c /LibGUI/GEventLoop.cpp
parentc02c9880b61569455eeea1dacaa15d29c33021ea (diff)
downloadserenity-318db1e48e49a6eec5a27355e39a38cbc243475c.zip
WindowServer: Broadcast screen rect changes to all clients.
GUI clients can now obtain the screen rect via GDesktop::rect().
Diffstat (limited to 'LibGUI/GEventLoop.cpp')
-rw-r--r--LibGUI/GEventLoop.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/LibGUI/GEventLoop.cpp b/LibGUI/GEventLoop.cpp
index 1756198b2e..16f7996d22 100644
--- a/LibGUI/GEventLoop.cpp
+++ b/LibGUI/GEventLoop.cpp
@@ -6,6 +6,7 @@
#include <LibGUI/GAction.h>
#include <LibGUI/GNotifier.h>
#include <LibGUI/GMenu.h>
+#include <LibGUI/GDesktop.h>
#include <LibC/unistd.h>
#include <LibC/stdio.h>
#include <LibC/fcntl.h>
@@ -339,6 +340,12 @@ void GEventLoop::process_unprocessed_messages()
for (auto& event : unprocessed_events) {
if (event.type == WSAPI_ServerMessage::Type::Greeting) {
s_server_pid = event.greeting.server_pid;
+ GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), event.greeting.screen_rect);
+ continue;
+ }
+
+ if (event.type == WSAPI_ServerMessage::Type::ScreenRectChanged) {
+ GDesktop::the().did_receive_screen_rect(Badge<GEventLoop>(), event.screen.rect);
continue;
}