clutter: Pass scroll source to discrete events
This piece of information was lost, always returning "unknown". We can do better on the native backend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3642>
This commit is contained in:
parent
3c217d2902
commit
7aebc9e63d
@ -64,6 +64,7 @@ ClutterEvent * clutter_event_scroll_discrete_new (ClutterEventFlags flags,
|
||||
ClutterInputDeviceTool *tool,
|
||||
ClutterModifierType modifiers,
|
||||
graphene_point_t coords,
|
||||
ClutterScrollSource scroll_source,
|
||||
ClutterScrollDirection direction);
|
||||
CLUTTER_EXPORT
|
||||
ClutterEvent * clutter_event_crossing_new (ClutterEventType type,
|
||||
|
@ -2017,6 +2017,7 @@ clutter_event_scroll_discrete_new (ClutterEventFlags flags,
|
||||
ClutterInputDeviceTool *tool,
|
||||
ClutterModifierType modifiers,
|
||||
graphene_point_t coords,
|
||||
ClutterScrollSource scroll_source,
|
||||
ClutterScrollDirection direction)
|
||||
{
|
||||
ClutterEvent *event;
|
||||
@ -2031,6 +2032,7 @@ clutter_event_scroll_discrete_new (ClutterEventFlags flags,
|
||||
event->scroll.x = coords.x;
|
||||
event->scroll.y = coords.y;
|
||||
event->scroll.direction = direction;
|
||||
event->scroll.scroll_source = scroll_source;
|
||||
event->scroll.modifier_state = modifiers;
|
||||
event->scroll.tool = tool;
|
||||
|
||||
|
@ -990,6 +990,7 @@ notify_discrete_scroll (ClutterInputDevice *input_device,
|
||||
NULL,
|
||||
modifiers,
|
||||
GRAPHENE_POINT_INIT (x, y),
|
||||
scroll_source,
|
||||
direction);
|
||||
|
||||
queue_event (seat_impl, event);
|
||||
|
@ -2378,6 +2378,7 @@ meta_seat_x11_translate_event (MetaSeatX11 *seat,
|
||||
tool,
|
||||
state,
|
||||
GRAPHENE_POINT_INIT (x, y),
|
||||
CLUTTER_SCROLL_SOURCE_UNKNOWN,
|
||||
scroll_direction);
|
||||
|
||||
g_debug ("scroll: win:0x%x, device:%d '%s', time:%d "
|
||||
|
Loading…
x
Reference in New Issue
Block a user