mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 09:07:35 +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:
parent
f7ca6d254d
commit
4fef895eda
15 changed files with 121 additions and 33 deletions
|
@ -4,9 +4,9 @@
|
|||
#include <Widgets/Size.h>
|
||||
#include <Kernel/Keyboard.h>
|
||||
|
||||
class WSScreen : public KeyboardClient {
|
||||
class WSScreen {
|
||||
public:
|
||||
virtual ~WSScreen();
|
||||
~WSScreen();
|
||||
|
||||
int width() const { return m_width; }
|
||||
int height() const { return m_height; }
|
||||
|
@ -23,14 +23,12 @@ public:
|
|||
bool right_mouse_button_pressed() const { return m_right_mouse_button_pressed; }
|
||||
|
||||
void on_receive_mouse_data(int dx, int dy, bool left_button, bool right_button);
|
||||
void on_receive_keyboard_data(Keyboard::Key);
|
||||
|
||||
protected:
|
||||
WSScreen(unsigned width, unsigned height);
|
||||
|
||||
private:
|
||||
// ^KeyboardClient
|
||||
virtual void on_key_pressed(Keyboard::Key) final;
|
||||
|
||||
int m_width { 0 };
|
||||
int m_height { 0 };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue