swaywm/wlr-protocols

touch: Negative id in event callbacks for non-multi-touch devices

any1 opened this issue · 1 comments

any1 commented

The wl_touch_listener events are passed a touch id originating from libinput. This is used to delineate between multiple touch events on the same device.
The negative value (i.e. -1) originates from a call to libinput_event_touch_get_slot which returns -1 when the touch device is a single touch device. This confuses a particular wayland client that I run (cog) but it is unclear whether a negative id is in fact allowed or not according to the protocol.
Weston uses a different call libinput_event_touch_get_seat_slot which is always a non-negative number, but it is per seat. Should wlroots perhaps also use libinput_event_touch_get_seat_slot?

any1 commented

Whoops. I intended to open this is wlroots. I have too many open tabs.