mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-29 06:40:08 +01:00
touchpad: use the udev ID_INPUT_TOUCHPAD_INTEGRATION property if available
udev now labels touchpads as "internal" or "external" for us, use that value
where available and only fall back onto our own labelling if it's missing or
unknown.
systemd commit: https://github.com/systemd/systemd/pull/3638
https://bugs.freedesktop.org/show_bug.cgi?id=96735
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 64e3941189)
This commit is contained in:
parent
d7d64d9871
commit
6614604e9a
1 changed files with 18 additions and 0 deletions
|
|
@ -1589,6 +1589,24 @@ evdev_tag_touchpad(struct evdev_device *device,
|
|||
struct udev_device *udev_device)
|
||||
{
|
||||
int bustype, vendor;
|
||||
const char *prop;
|
||||
|
||||
prop = udev_device_get_property_value(udev_device,
|
||||
"ID_INPUT_TOUCHPAD_INTEGRATION");
|
||||
if (prop) {
|
||||
if (streq(prop, "internal")) {
|
||||
evdev_tag_touchpad_internal(device);
|
||||
return;
|
||||
} else if (streq(prop, "external")) {
|
||||
evdev_tag_touchpad_external(device);
|
||||
return;
|
||||
} else {
|
||||
log_info(evdev_libinput_context(device),
|
||||
"%s: tagged as unknown value %s\n",
|
||||
device->devname,
|
||||
prop);
|
||||
}
|
||||
}
|
||||
|
||||
/* simple approach: touchpads on USB or Bluetooth are considered
|
||||
* external, anything else is internal. Exception is Apple -
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue