1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

WindowServer+LibGUI: Handle mouse wheel deltas in the mouse event stream.

The wheel events will end up in GWidget::mousewheel_event(GMouseEvent&)
on the client-side. This patch also implements basic wheel scrolling in
GScrollableWidget via this mechanism. :^)
This commit is contained in:
Andreas Kling 2019-05-13 19:52:57 +02:00
parent dae8eb6454
commit dab9901235
13 changed files with 58 additions and 25 deletions

View file

@ -86,6 +86,8 @@ void GWidget::event(CEvent& event)
return handle_mousedown_event(static_cast<GMouseEvent&>(event));
case GEvent::MouseUp:
return handle_mouseup_event(static_cast<GMouseEvent&>(event));
case GEvent::MouseWheel:
return mousewheel_event(static_cast<GMouseEvent&>(event));
case GEvent::Enter:
return handle_enter_event(event);
case GEvent::Leave:
@ -261,6 +263,10 @@ void GWidget::mousemove_event(GMouseEvent&)
{
}
void GWidget::mousewheel_event(GMouseEvent&)
{
}
void GWidget::context_menu_event(GContextMenuEvent&)
{
}