keyboard: Don't send repeated events to server
This caused the virtual key to get "stuck" in the pressed position and then to stop working at all. It's definitely a bug on the server side also.vencrypt
parent
b744e2410e
commit
e2079a7e56
|
@ -34,6 +34,7 @@ struct table_entry {
|
|||
xkb_keysym_t symbol;
|
||||
xkb_keycode_t code;
|
||||
int level;
|
||||
bool is_pressed;
|
||||
};
|
||||
|
||||
static void append_entry(struct keyboard* self, xkb_keysym_t symbol,
|
||||
|
@ -263,6 +264,11 @@ void keyboard_feed(struct keyboard* self, xkb_keysym_t symbol, bool is_pressed)
|
|||
return; // TODO: Notify the user about this
|
||||
}
|
||||
|
||||
if (entry->is_pressed == is_pressed)
|
||||
return;
|
||||
|
||||
entry->is_pressed = is_pressed;
|
||||
|
||||
// TODO: This could cause some synchronisation problems with other
|
||||
// keyboards in the seat.
|
||||
keyboard_apply_mods(self, entry->code, is_pressed);
|
||||
|
|
Loading…
Reference in New Issue