mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
backends/native: Use correct constructor for CLUTTER_TOUCH_CANCEL events
We were using the generic constructor for BEGIN/UPDATE/END events, that have more data than CLUTTER_TOUCH_CANCEL. Since that function checks for the event type, we were awkwardly forwarding a NULL event here. Related: https://gitlab.gnome.org/GNOME/mutter/-/issues/3016 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3261>
This commit is contained in:
parent
3f7c1be59a
commit
4075847278
@ -1071,14 +1071,24 @@ meta_seat_impl_notify_touch_event_in_impl (MetaSeatImpl *seat_impl,
|
||||
evtype == CLUTTER_TOUCH_UPDATE)
|
||||
modifiers |= CLUTTER_BUTTON1_MASK;
|
||||
|
||||
event =
|
||||
clutter_event_touch_new (evtype,
|
||||
CLUTTER_EVENT_NONE,
|
||||
time_us,
|
||||
input_device,
|
||||
sequence,
|
||||
modifiers,
|
||||
GRAPHENE_POINT_INIT (x, y));
|
||||
if (evtype == CLUTTER_TOUCH_CANCEL)
|
||||
{
|
||||
event = clutter_event_touch_cancel_new (CLUTTER_EVENT_NONE,
|
||||
time_us,
|
||||
input_device,
|
||||
sequence);
|
||||
}
|
||||
else
|
||||
{
|
||||
event =
|
||||
clutter_event_touch_new (evtype,
|
||||
CLUTTER_EVENT_NONE,
|
||||
time_us,
|
||||
input_device,
|
||||
sequence,
|
||||
modifiers,
|
||||
GRAPHENE_POINT_INIT (x, y));
|
||||
}
|
||||
|
||||
queue_event (seat_impl, event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user