mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:27:34 +00:00
Move WindowServer to userspace.
This is a monster patch that required changing a whole bunch of things. There are performance and stability issues all over the place, but it works. Pretty cool, I have to admit :^)
This commit is contained in:
parent
0b1b21d622
commit
640360e958
41 changed files with 325 additions and 463 deletions
|
@ -1,14 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#include "WSMessage.h"
|
||||
#include <AK/Lock.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <AK/Function.h>
|
||||
|
||||
class WSMessageReceiver;
|
||||
class Process;
|
||||
struct WSAPI_ClientMessage;
|
||||
struct WSAPI_ServerMessage;
|
||||
|
||||
|
@ -24,9 +22,6 @@ public:
|
|||
static WSMessageLoop& the();
|
||||
|
||||
bool running() const { return m_running; }
|
||||
Process& server_process() { return *m_server_process; }
|
||||
|
||||
void set_server_process(Process& process) { m_server_process = &process; }
|
||||
|
||||
int start_timer(int ms, Function<void()>&&);
|
||||
int stop_timer(int timer_id);
|
||||
|
@ -34,23 +29,19 @@ public:
|
|||
void post_message_to_client(int client_id, const WSAPI_ServerMessage&);
|
||||
void on_receive_from_client(int client_id, const WSAPI_ClientMessage&);
|
||||
|
||||
static Process* process_from_client_id(int client_id);
|
||||
void notify_client_died(int client_id);
|
||||
void notify_client_disconnected(int client_id);
|
||||
|
||||
private:
|
||||
void wait_for_message();
|
||||
void drain_mouse();
|
||||
void drain_keyboard();
|
||||
|
||||
Lock m_lock;
|
||||
|
||||
struct QueuedMessage {
|
||||
WSMessageReceiver* receiver { nullptr };
|
||||
OwnPtr<WSMessage> message;
|
||||
};
|
||||
Vector<QueuedMessage> m_queued_messages;
|
||||
|
||||
Process* m_server_process { nullptr };
|
||||
bool m_running { false };
|
||||
|
||||
int m_keyboard_fd { -1 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue