See thread at: https://lists.freedesktop.org/archives/wayland-devel/2018-January/036636.html The number of touches is used to differentiate between multitouch and non-multitouch devices. Could theoretically also be used to identify what user interface is needed (2 touches vs 5+ touches) but let's not pretend anyone is ever going to actually do this...
Just a few notes: the TOUCH capability is assigned to any touch device, even single-touch touchscreens. Whether it's single touch or multi-touch is not exposed, but we have device->mt.slots_len with the number of slots internally. There is no capability API outside of that, the closest we have for querying specific devices is the libinput_device_<type>_has* set of functions to check for buttons or keys. So libinput_device_touch_get_num_touches() would fit, and so would libinput_device_touch_has_multitouch() for a basic boolean check. CC-ing carlos in case he has any thoughts on using it in mutter.
(In reply to Peter Hutterer from comment #1) > Just a few notes: the TOUCH capability is assigned to any touch device, even > single-touch touchscreens. Whether it's single touch or multi-touch is not > exposed, but we have device->mt.slots_len with the number of slots > internally. > > There is no capability API outside of that, the closest we have for querying > specific devices is the libinput_device_<type>_has* set of functions to > check for buttons or keys. So libinput_device_touch_get_num_touches() would > fit, and so would libinput_device_touch_has_multitouch() for a basic boolean > check. > > CC-ing carlos in case he has any thoughts on using it in mutter. Not specifically tbh. All multitouch functionality is already redundant so we don't have any place where we want to act differently if n_touches==1.
https://lists.freedesktop.org/archives/wayland-devel/2018-March/037280.html
No response on the list even with a ping, closing.
ok, tests came in after all, pushed as commit 63e5372190606c5c124eafbc4cac753f59bb9f69 Author: Peter Hutterer <> Date: Wed Jan 31 16:04:09 2018 +1000 Add libinput_device_touch_get_touch_count()
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.