From b44f6b4eefbf45754f4bd7f0297afb083c702950 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 27 Aug 2018 08:26:00 +1000 Subject: [PATCH] fallback: explicitly ignore external keyboards for the tablet mode switch We already had a check to only pair trackpoints and internal keyboards but for the ThinkPad Compact Bluetooth Keyboard with TrackPoint that isn't sufficient - it's an external keyboard that contains a trackpoint. Explicitly ignore external keyboard, we never want to shut those down in tablet mode anyway. Fixes #119 Signed-off-by: Peter Hutterer --- src/evdev-fallback.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/evdev-fallback.c b/src/evdev-fallback.c index bf5a0f6d..c498393d 100644 --- a/src/evdev-fallback.c +++ b/src/evdev-fallback.c @@ -1294,6 +1294,9 @@ fallback_keyboard_pair_tablet_mode(struct evdev_device *keyboard, struct fallback_dispatch *dispatch = fallback_dispatch(keyboard->dispatch); + if ((keyboard->tags & EVDEV_TAG_EXTERNAL_KEYBOARD)) + return; + if ((keyboard->tags & (EVDEV_TAG_TRACKPOINT|EVDEV_TAG_INTERNAL_KEYBOARD)) == 0) return;