From 5a4ada08fdb1fef469d80a4af8812414e026a6a8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 4 Mar 2015 09:51:54 +1000 Subject: [PATCH] touchpad: don't warn about clickpads without left buttons Clickpads have BTN_LEFT but no BTN_RIGHT, non-clickpads must have both. Tablet touch devices don't have any buttons, so skip the warning for those. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- src/evdev-mt-touchpad-buttons.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index 12f80234..fc79b0fc 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -667,8 +667,8 @@ tp_init_buttons(struct tp_dispatch *tp, log_bug_kernel(libinput, "%s: clickpad advertising right button\n", device->devname); - } else { - if (!tp->buttons.is_clickpad) + } else if (libevdev_has_event_code(device->evdev, EV_KEY, BTN_LEFT) && + !tp->buttons.is_clickpad) { log_bug_kernel(libinput, "%s: non clickpad without right button?\n", device->devname);