[mutter] clutter/evdev: Ensure a valid ClutterEventSequence on single-touch devices
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/evdev: Ensure a valid ClutterEventSequence on single-touch devices
- Date: Wed, 17 Jan 2018 15:55:02 +0000 (UTC)
commit 73464192959a79f0a5d0db38c4c87f63486eb0af
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jan 16 19:47:55 2018 +0100
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
.../clutter/evdev/clutter-device-manager-evdev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/clutter/evdev/clutter-device-manager-evdev.c
b/clutter/clutter/evdev/clutter-device-manager-evdev.c
index d00c771..2fd66b9 100644
--- a/clutter/clutter/evdev/clutter-device-manager-evdev.c
+++ b/clutter/clutter/evdev/clutter-device-manager-evdev.c
@@ -432,7 +432,7 @@ notify_touch_event (ClutterInputDevice *input_device,
&event->touch.y);
/* "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);
if (evtype == CLUTTER_TOUCH_BEGIN ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]