Ignore key repeat in all backends

Since we don't really care about keys in any of these backends and buttons
shouldn't autorepeat anyway, this should have no effect on functionality. But
it does guard us against potential kernel bugs like  this one:
https://www.spinics.net/lists/linux-input/msg67653.html

See https://gitlab.freedesktop.org/libinput/libinput/-/issues/447#note_468971

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2020-06-02 10:52:11 +10:00
parent 034226d904
commit 2a7ea444e3
4 changed files with 16 additions and 0 deletions

View file

@ -748,6 +748,10 @@ tp_process_key(struct tp_dispatch *tp,
const struct input_event *e,
uint64_t time)
{
/* ignore kernel key repeat */
if (e->value == 2)
return;
switch (e->code) {
case BTN_LEFT:
case BTN_MIDDLE:

View file

@ -332,6 +332,10 @@ pad_process_key(struct pad_dispatch *pad,
uint32_t button = e->code;
uint32_t is_press = e->value != 0;
/* ignore kernel key repeat */
if (e->value == 2)
return;
pad_button_set_down(pad, button, is_press);
}

View file

@ -812,6 +812,10 @@ tablet_process_key(struct tablet_dispatch *tablet,
{
enum libinput_tablet_tool_type type;
/* ignore kernel key repeat */
if (e->value == 2)
return;
switch (e->code) {
case BTN_TOOL_FINGER:
evdev_log_bug_libinput(device,

View file

@ -181,6 +181,10 @@ totem_process_key(struct totem_dispatch *totem,
struct input_event *e,
uint64_t time)
{
/* ignore kernel key repeat */
if (e->value == 2)
return;
switch(e->code) {
case BTN_0:
totem->button_state_now = !!e->value;