mirror of
https://github.com/brl/mutter.git
synced 2025-01-22 17:38:56 +00:00
evdev: Prefer pointer/touch devices over keyboard devices
In keyboard/mouse wireless combos, it is rather common for the mouse to claim it contains the multimedia keys, this makes libinput enable both the pointer and keyboard capabilities on this device, and Clutter thus to create a keyboard ClutterInputDevice for it. Ideally clutter devices should be able to reflect their full capabilities, or maybe account for the fact that certain events can be sent from seemingly unexpected device types. But this will bring a somewhat better behavior on such devices. https://bugzilla.gnome.org/show_bug.cgi?id=740518
This commit is contained in:
parent
8afb499ce5
commit
a18b2f067b
@ -190,12 +190,12 @@ ClutterInputDeviceType
|
||||
_clutter_input_device_evdev_determine_type (struct libinput_device *ldev)
|
||||
{
|
||||
|
||||
if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD))
|
||||
return CLUTTER_KEYBOARD_DEVICE;
|
||||
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER))
|
||||
if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_POINTER))
|
||||
return CLUTTER_POINTER_DEVICE;
|
||||
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_TOUCH))
|
||||
return CLUTTER_TOUCHSCREEN_DEVICE;
|
||||
else if (libinput_device_has_capability (ldev, LIBINPUT_DEVICE_CAP_KEYBOARD))
|
||||
return CLUTTER_KEYBOARD_DEVICE;
|
||||
else
|
||||
return CLUTTER_EXTENSION_DEVICE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user