summaryrefslogtreecommitdiff
path: root/WindowServer/WSScreen.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-01-16 17:20:58 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-01-16 17:20:58 +0100
commit4fef895edab80cbe2d9f886f5b769973af93a040 (patch)
treea76dfad89256528d9b0eda5887289d787ff65690 /WindowServer/WSScreen.cpp
parentf7ca6d254d452e3524aaeaa1334ac041be3a1279 (diff)
downloadserenity-4fef895edab80cbe2d9f886f5b769973af93a040.zip
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.
Diffstat (limited to 'WindowServer/WSScreen.cpp')
-rw-r--r--WindowServer/WSScreen.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/WindowServer/WSScreen.cpp b/WindowServer/WSScreen.cpp
index 2276ff6f5d..d1ce9ec132 100644
--- a/WindowServer/WSScreen.cpp
+++ b/WindowServer/WSScreen.cpp
@@ -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;