mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-03-23 00:20:43 +01:00
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 <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
019f185107
commit
7c3279346d
1 changed files with 2 additions and 22 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue