mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 12:50:33 +01:00
touchpad: only pair internal trackpoint devices with internal touchpads
Internal touchpads with trackpoints are either BUS_I8042 or BUS_I2C, but not BUS_USB. Lenovo sells external keyboards with a trackpoint built-in, make sure we don't pair that trackpoint with the internal touchpad. And likewise, the internal trackpoint should not be paired with e.g. a wacom touch device. Lenovo had one external device that has a trackpoint and a touchpad on an external keyboard. That device won't be covered with this patch, if we have a user we can re-consider. https://bugs.freedesktop.org/show_bug.cgi?id=89935 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
c74d07bee9
commit
7552cd04f7
1 changed files with 8 additions and 1 deletions
|
|
@ -825,9 +825,16 @@ tp_device_added(struct evdev_device *device,
|
|||
struct evdev_device *added_device)
|
||||
{
|
||||
struct tp_dispatch *tp = (struct tp_dispatch*)device->dispatch;
|
||||
unsigned int bus_tp = libevdev_get_id_bustype(device->evdev),
|
||||
bus_trp = libevdev_get_id_bustype(added_device->evdev);
|
||||
bool tp_is_internal, trp_is_internal;
|
||||
|
||||
tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH;
|
||||
trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH;
|
||||
|
||||
if (tp->buttons.trackpoint == NULL &&
|
||||
(added_device->tags & EVDEV_TAG_TRACKPOINT)) {
|
||||
(added_device->tags & EVDEV_TAG_TRACKPOINT) &&
|
||||
tp_is_internal && trp_is_internal) {
|
||||
/* Don't send any pending releases to the new trackpoint */
|
||||
tp->buttons.active_is_topbutton = false;
|
||||
tp->buttons.trackpoint = added_device;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue