mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +00:00
Make PS2MouseDevice behave more like a proper character device.
Get rid of the goofy MouseClient interface and have the GUI event loop just read mouse data from the character device. The previous approach was awful as it was sending us into random GUI code in the mouse interrupt handler.
This commit is contained in:
parent
52e019f9aa
commit
fd4e86460b
5 changed files with 31 additions and 36 deletions
|
@ -28,7 +28,6 @@ AbstractScreen::AbstractScreen(unsigned width, unsigned height)
|
|||
|
||||
m_cursor_location = rect().center();
|
||||
|
||||
PS2MouseDevice::the().set_client(this);
|
||||
Keyboard::the().set_client(this);
|
||||
}
|
||||
|
||||
|
@ -36,7 +35,7 @@ AbstractScreen::~AbstractScreen()
|
|||
{
|
||||
}
|
||||
|
||||
void AbstractScreen::did_receive_mouse_data(int dx, int dy, bool left_button, bool right_button)
|
||||
void AbstractScreen::on_receive_mouse_data(int dx, int dy, bool left_button, bool right_button)
|
||||
{
|
||||
auto prev_location = m_cursor_location;
|
||||
m_cursor_location.moveBy(dx, dy);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue