touchpad: don't pair external touchpads with lid/tablet mode switches

https://gitlab.freedesktop.org/libinput/libinput/issues/29

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2018-06-08 15:15:24 +10:00
parent 845e912527
commit 46b64c7363

View file

@ -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,