1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:47:45 +00:00

WindowServer+LibGUI: Allow arbitrary number of rects in messages.

To get truly atomic updates, add a mechanism for passing arbitrary amounts
of extra data along with WindowServer messages. This allows us to pass all
the rects in a single message.
This commit is contained in:
Andreas Kling 2019-04-22 01:15:47 +02:00
parent f9d3abf5d0
commit 9f122bff5a
12 changed files with 167 additions and 60 deletions

View file

@ -1,6 +1,7 @@
#pragma once
#include <LibCore/CEventLoop.h>
#include <AK/ByteBuffer.h>
class WSClientConnection;
struct WSAPI_ClientMessage;
@ -20,7 +21,7 @@ private:
void drain_mouse();
void drain_keyboard();
void drain_client(WSClientConnection&);
void on_receive_from_client(int client_id, const WSAPI_ClientMessage&);
bool on_receive_from_client(int client_id, const WSAPI_ClientMessage&, ByteBuffer&& extra_data);
int m_keyboard_fd { -1 };
int m_mouse_fd { -1 };