1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

WindowServer+LibGUI: Support the 4th and 5th mouse buttons

We'll call the "Back" and "Forward" since that's what they are normally
mapped to in some other systems.
This commit is contained in:
Andreas Kling 2020-05-02 22:07:43 +02:00
parent c5882d3a18
commit 67b92a7d5f
6 changed files with 16 additions and 0 deletions

View file

@ -145,6 +145,8 @@ void Screen::on_receive_mouse_data(const MousePacket& packet)
post_mousedown_or_mouseup_if_needed(MouseButton::Left);
post_mousedown_or_mouseup_if_needed(MouseButton::Right);
post_mousedown_or_mouseup_if_needed(MouseButton::Middle);
post_mousedown_or_mouseup_if_needed(MouseButton::Back);
post_mousedown_or_mouseup_if_needed(MouseButton::Forward);
if (m_cursor_location != prev_location) {
auto message = make<MouseEvent>(Event::MouseMove, m_cursor_location, buttons, MouseButton::None, m_modifiers);
Core::EventLoop::current().post_event(WindowManager::the(), move(message));