From 46b64c73633cb73bfa23b7f141f9e9ed88c66992 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 8 Jun 2018 15:15:24 +1000 Subject: [PATCH] touchpad: don't pair external touchpads with lid/tablet mode switches https://gitlab.freedesktop.org/libinput/libinput/issues/29 Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index dd575510..a78a6151 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -2253,6 +2253,9 @@ tp_pair_lid_switch(struct evdev_device *touchpad, if ((lid_switch->tags & EVDEV_TAG_LID_SWITCH) == 0) return; + if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD) + return; + if (tp->lid_switch.lid_switch == NULL) { evdev_log_debug(touchpad, "lid_switch: activated for %s<->%s\n", @@ -2278,6 +2281,9 @@ tp_pair_tablet_mode_switch(struct evdev_device *touchpad, if (tp->tablet_mode_switch.tablet_mode_switch) return; + if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD) + return; + evdev_log_debug(touchpad, "tablet_mode_switch: activated for %s<->%s\n", touchpad->devname,