mirror of
https://github.com/brl/mutter.git
synced 2024-12-01 12:20:47 -05:00
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. https://bugzilla.gnome.org/show_bug.cgi?id=741350
This commit is contained in:
parent
a18b2f067b
commit
1cabee8d24
@ -189,8 +189,12 @@ _clutter_input_device_evdev_update_leds (ClutterInputDeviceEvdev *device,
|
|||||||
ClutterInputDeviceType
|
ClutterInputDeviceType
|
||||||
_clutter_input_device_evdev_determine_type (struct libinput_device *ldev)
|
_clutter_input_device_evdev_determine_type (struct libinput_device *ldev)
|
||||||
{
|
{
|
||||||
|
/* This setting is specific to touchpads and alike, only in these
|
||||||
if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER))
|
* devices there is this additional layer of touch event interpretation.
|
||||||
|
*/
|
||||||
|
if (libinput_device_config_tap_get_finger_count (ldev) > 0)
|
||||||
|
return CLUTTER_TOUCHPAD_DEVICE;
|
||||||
|
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER))
|
||||||
return CLUTTER_POINTER_DEVICE;
|
return CLUTTER_POINTER_DEVICE;
|
||||||
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH))
|
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH))
|
||||||
return CLUTTER_TOUCHSCREEN_DEVICE;
|
return CLUTTER_TOUCHSCREEN_DEVICE;
|
||||||
|
Loading…
Reference in New Issue
Block a user