[PATCH libinput 6/7] touchpad: don't warn about clickpads without left buttons
Peter Hutterer
peter.hutterer at who-t.net
Tue Mar 3 20:18:36 PST 2015
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 <peter.hutterer at who-t.net>
---
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 12f8023..fc79b0f 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);
--
2.1.0
More information about the wayland-devel
mailing list