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 <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
Peter Hutterer 2015-03-04 09:51:54 +10:00
parent aa3d09932f
commit 5a4ada08fd

View file

@ -667,8 +667,8 @@ tp_init_buttons(struct tp_dispatch *tp,
log_bug_kernel(libinput, log_bug_kernel(libinput,
"%s: clickpad advertising right button\n", "%s: clickpad advertising right button\n",
device->devname); device->devname);
} else { } else if (libevdev_has_event_code(device->evdev, EV_KEY, BTN_LEFT) &&
if (!tp->buttons.is_clickpad) !tp->buttons.is_clickpad) {
log_bug_kernel(libinput, log_bug_kernel(libinput,
"%s: non clickpad without right button?\n", "%s: non clickpad without right button?\n",
device->devname); device->devname);