clutter/evdev: Ensure a valid ClutterEventSequence on single-touch devices

Libinput shall report those as having slot=-1, which gets mistakenly
translated into the special "NULL" ClutterEventSequence. Making those
events get a non-NULL sequence will make single touch devices work.

https://bugzilla.gnome.org/show_bug.cgi?id=792005
This commit is contained in:
Carlos Garnacho 2018-01-16 19:47:55 +01:00
parent 3e77f6704b
commit 7346419295

View File

@ -432,7 +432,7 @@ notify_touch_event (ClutterInputDevice *input_device,
&event->touch.y); &event->touch.y);
/* "NULL" sequences are special cased in clutter */ /* "NULL" sequences are special cased in clutter */
event->touch.sequence = GINT_TO_POINTER (slot + 1); event->touch.sequence = GINT_TO_POINTER (MAX (1, slot + 1));
_clutter_xkb_translate_state (event, seat->xkb, seat->button_state); _clutter_xkb_translate_state (event, seat->xkb, seat->button_state);
if (evtype == CLUTTER_TOUCH_BEGIN || if (evtype == CLUTTER_TOUCH_BEGIN ||