1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 10:14:58 +00:00

Rework WindowServer to use select() in its main event loop.

The system can finally idle without burning CPU. :^)

There are some issues with scheduling making the mouse cursor sloppy
and unresponsive that need to be dealt with.
This commit is contained in:
Andreas Kling 2019-01-16 17:20:58 +01:00
parent f7ca6d254d
commit 4fef895eda
15 changed files with 121 additions and 33 deletions

View file

@ -25,8 +25,6 @@ WSScreen::WSScreen(unsigned width, unsigned height)
s_the = this;
m_cursor_location = rect().center();
Keyboard::the().set_client(this);
}
WSScreen::~WSScreen()
@ -62,7 +60,7 @@ void WSScreen::on_receive_mouse_data(int dx, int dy, bool left_button, bool righ
WSWindowManager::the().draw_cursor();
}
void WSScreen::on_key_pressed(Keyboard::Key key)
void WSScreen::on_receive_keyboard_data(Keyboard::Key key)
{
auto event = make<KeyEvent>(WSEvent::KeyDown, 0);
int key_code = 0;