mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 02:08:11 +00:00
WindowServer: Set the WSMessageLoop::server_process() as early as possible.
This commit is contained in:
parent
a3799cb71e
commit
004aad0995
3 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,7 @@ WSMessageLoop& WSMessageLoop::the()
|
|||
|
||||
int WSMessageLoop::exec()
|
||||
{
|
||||
m_server_process = current;
|
||||
ASSERT(m_server_process == current);
|
||||
|
||||
m_keyboard_fd = m_server_process->sys$open("/dev/keyboard", O_RDONLY);
|
||||
m_mouse_fd = m_server_process->sys$open("/dev/psaux", O_RDONLY);
|
||||
|
|
|
@ -22,6 +22,8 @@ public:
|
|||
bool running() const { return m_running; }
|
||||
Process& server_process() { return *m_server_process; }
|
||||
|
||||
void set_server_process(Process& process) { m_server_process = &process; }
|
||||
|
||||
private:
|
||||
void wait_for_message();
|
||||
void drain_mouse();
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
void WindowServer_main()
|
||||
{
|
||||
WSMessageLoop::the().set_server_process(*current);
|
||||
current->set_priority(Process::HighPriority);
|
||||
auto info = current->set_video_resolution(1024, 768);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue