aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndri Yngvason <andri.yngvason@marel.com>2019-08-15 13:49:46 +0000
committerSimon Ser <contact@emersion.fr>2019-08-15 18:46:54 +0300
commit4f4d3cf2a25f7af022e51b861ef04f7c4a94b768 (patch)
tree17ce8ba603adff5d598d8d7c6bfeab08d848b83a
parent9914784594713f184c58e37def1d136c6af394a9 (diff)
backend: touch: Assign good ids to single touch devices
libinput_event_touch_get_slot always returns -1 for single touch devices. Using libinput_event_touch_get_seat_slot instead ensures that they are assigned actual slot ids. Also, this is what Weston does, so this change yields a more consistent behaviour between different compositors.
-rw-r--r--backend/libinput/touch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index cb9b0e36..e1c2fca4 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -34,7 +34,7 @@ void handle_touch_down(struct libinput_event *event,
wlr_event.device = wlr_dev;
wlr_event.time_msec =
usec_to_msec(libinput_event_touch_get_time_usec(tevent));
- wlr_event.touch_id = libinput_event_touch_get_slot(tevent);
+ wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_event.x = libinput_event_touch_get_x_transformed(tevent, 1);
wlr_event.y = libinput_event_touch_get_y_transformed(tevent, 1);
wlr_signal_emit_safe(&wlr_dev->touch->events.down, &wlr_event);