mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-05 13:20:28 +01:00
touchpad: Ignore non left clicks on clickpads
We should never get any non left button events on clickpads, but if we do these might confuse our state, so complain about it and ignore these. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
f6c3731f8a
commit
a4bd36071e
1 changed files with 8 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue