mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 23:39:02 +00:00
WindowServer: Broadcast screen rect changes to all clients.
GUI clients can now obtain the screen rect via GDesktop::rect().
This commit is contained in:
parent
c02c9880b6
commit
318db1e48e
Notes:
sideshowbarker
2024-07-19 14:50:07 +09:00
Author: https://github.com/awesomekling
Commit: 318db1e48e
7 changed files with 40 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue