summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2021-09-20 11:56:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2021-09-21 09:28:18 +1000
commitea7a88d213cdca73348a8e310ae491cd1925c6a3 (patch)
treee3cbbded499ab254c0811ee957e5d624d5d234cf
parent5f966dc6c67194d2eaba250cea9832bbb017e565 (diff)
downloadlibinput-ea7a88d213cdca73348a8e310ae491cd1925c6a3.tar.gz
touchpad: use the model flags to determine internal vs external
When pairing a trackpoint, use the model flags for the touchpad, don't use a separate set of conditions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/evdev-mt-touchpad.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 59d457b7..4ddc9e07 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -2406,14 +2406,13 @@ tp_pair_trackpoint(struct evdev_device *touchpad,
struct evdev_device *trackpoint)
{
struct tp_dispatch *tp = (struct tp_dispatch*)touchpad->dispatch;
- unsigned int bus_tp = libevdev_get_id_bustype(touchpad->evdev),
- bus_trp = libevdev_get_id_bustype(trackpoint->evdev);
+ unsigned int bus_trp = libevdev_get_id_bustype(trackpoint->evdev);
bool tp_is_internal, trp_is_internal;
if ((trackpoint->tags & EVDEV_TAG_TRACKPOINT) == 0)
return;
- tp_is_internal = bus_tp != BUS_USB && bus_tp != BUS_BLUETOOTH;
+ tp_is_internal = !!(touchpad->tags & EVDEV_TAG_INTERNAL_TOUCHPAD);
trp_is_internal = bus_trp != BUS_USB && bus_trp != BUS_BLUETOOTH;
if (tp->buttons.trackpoint == NULL &&