GNOME Bugzilla – Bug 741350
Improve touchpad detection on libinput
Last modified: 2014-12-11 10:49:39 UTC
I'm attaching a couple of patches that make touchpads recognized as such when libinput is used underneath. On the evdev backend, touchpad-specific settings can be poked, setting the right device type if the call returns an expected value. On X11, the story is somewhat different though... if xf86-input-libinput is used, touchpads won't report being XIDependentTouch, so the second patch adds a fallback check on the device name. It should actually help identifying correctly semi-mt touchpads, even with the synaptics driver.
Created attachment 292461 [details] [review] evdev: Lookup config to report touchpads as such Check a touchpad-only setting, and if it returns an expected value there, the device must be a CLUTTER_DEVICE_TOUCHPAD.
Created attachment 292462 [details] [review] x11: Resort to device name matching for non-mt touchpads If a touchpad is not multitouch, or does not report MT axes (eg. through the libinput driver), resort to name matching before falling back to CLUTTER_POINTER_DEVICE.
Review of attachment 292461 [details] [review]: ::: clutter/evdev/clutter-input-device-evdev.c @@ +190,3 @@ _clutter_input_device_evdev_determine_type (struct libinput_device *ldev) { + if (libinput_device_config_tap_get_finger_count (ldev) > 0) do touchscreen devices return a finger count per tap equals to 0?
Review of attachment 292462 [details] [review]: sounds fair to me.
(In reply to comment #3) > + if (libinput_device_config_tap_get_finger_count (ldev) > 0) > > do touchscreen devices return a finger count per tap equals to 0? This is basically a setting for the ABS_MT_* wrapping done exclusively on touchpads, touchscreens get the raw touch events, and no interpretation is performed on top. So for any other device that should be 0. I could be slightly concerned in the future with the touch device in display-less wacom tablets (eg. bamboos), as these are basically touchpads to libinput, but I don't think we want to differ much in dealing with these either.
Review of attachment 292461 [details] [review]: okay, sounds fair to me; could you please leave a comment to that effect above the check?
(In reply to comment #6) > okay, sounds fair to me; could you please leave a comment to that effect above > the check? Sure :), pushing to 1.22 with the extra comment.
Attachment 292461 [details] pushed as 1cabee8 - evdev: Lookup config to report touchpads as such Attachment 292462 [details] pushed as a0e2ba6 - x11: Resort to device name matching for non-mt touchpads