1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:17:35 +00:00

WindowServer: Begin refactoring towards a fully asynchronous protocol.

In order to move the WindowServer to userspace, I have to eliminate its
dependence on system call facilities. The communication channel with each
client needs to be message-based in both directions.
This commit is contained in:
Andreas Kling 2019-02-13 17:54:30 +01:00
parent 96352ab735
commit 4f98a35beb
18 changed files with 242 additions and 91 deletions

View file

@ -9,6 +9,7 @@
class WSMessageReceiver;
class Process;
struct GUI_Event;
class WSMessageLoop {
public:
@ -29,6 +30,11 @@ public:
int start_timer(int ms, Function<void()>&&);
int stop_timer(int timer_id);
void post_message_to_client(int client_id, const GUI_Event&);
ssize_t on_receive_from_client(int client_id, const byte*, size_t);
static Process* process_from_client_id(int client_id);
private:
void wait_for_message();
void drain_mouse();