diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c index a124e126..c65cd8a3 100644 --- a/src/evdev-mt-touchpad-buttons.c +++ b/src/evdev-mt-touchpad-buttons.c @@ -367,6 +367,14 @@ tp_process_button(struct tp_dispatch *tp, uint32_t time) { uint32_t mask = 1 << (e->code - BTN_LEFT); + + /* Ignore other buttons on clickpads */ + if (tp->buttons.is_clickpad && e->code != BTN_LEFT) { + log_bug("received %s button event on a clickpad (kernel bug?)\n", + libevdev_event_code_get_name(EV_KEY, e->code)); + return 0; + } + if (e->value) { tp->buttons.state |= mask; tp->queued |= TOUCHPAD_EVENT_BUTTON_PRESS;