Commit 2a7ea444 authored by Peter Hutterer's avatar Peter Hutterer

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 libinput/libinput#447 (comment 468971)Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 034226d9
......@@ -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:
......
......@@ -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);
}
......
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment