From 7c3279346deabd52c55ef3aaead3aa9b17546c64 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 10 Feb 2017 10:39:25 +1000 Subject: [PATCH] touchpad: drop 'is blacklisted' check for dwt pairing dwt is needed on internal touchpads only and those external ones that are a combo device. This also now gives us the same check for palm detect and dwt. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- src/evdev-mt-touchpad.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 1ac8413d..d46a1294 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -1486,23 +1486,6 @@ tp_keyboard_event(uint64_t time, struct libinput_event *event, void *data) time + timeout); } -static bool -tp_dwt_device_is_blacklisted(struct evdev_device *device) -{ - unsigned int bus = libevdev_get_id_bustype(device->evdev); - unsigned int vendor_id = libevdev_get_id_vendor(device->evdev); - - /* evemu will set the right bus type */ - if (bus == BUS_VIRTUAL || bus == BUS_BLUETOOTH) - return true; - - /* Wacom doesn't have devices that need dwt */ - if (vendor_id == VENDOR_ID_WACOM) - return true; - - return false; -} - static bool tp_want_dwt(struct evdev_device *touchpad, struct evdev_device *keyboard) @@ -1514,10 +1497,6 @@ tp_want_dwt(struct evdev_device *touchpad, unsigned int product_tp = evdev_device_get_id_product(touchpad); unsigned int product_kbd = evdev_device_get_id_product(keyboard); - if (tp_dwt_device_is_blacklisted(touchpad) || - tp_dwt_device_is_blacklisted(keyboard)) - return false; - /* External touchpads with the same vid/pid as the keyboard are considered a happy couple */ if (touchpad->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD) @@ -2194,7 +2173,8 @@ static void tp_init_dwt(struct tp_dispatch *tp, struct evdev_device *device) { - if (tp_dwt_device_is_blacklisted(device)) + if (device->tags & EVDEV_TAG_EXTERNAL_TOUCHPAD && + !tp_is_tpkb_combo_below(device)) return; tp->dwt.config.is_available = tp_dwt_config_is_available;