mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-12-23 10:29:49 +01:00
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.
This commit is contained in:
parent
9914784594
commit
4f4d3cf2a2
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue