From 102f41c1e16560964e383831bf77e9e7bfe88edf Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Sat, 13 Jun 2020 20:26:43 +0300 Subject: [PATCH] wayland.seat: Send modifiers event right after enter event wl_keyboard.modifiers must be sent after wl_keyboard.enter event, otherwise it's a protocol violation. --- src/wayland/seat/keyboard.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/seat/keyboard.rs b/src/wayland/seat/keyboard.rs index 594ae79..cf5ddd3 100644 --- a/src/wayland/seat/keyboard.rs +++ b/src/wayland/seat/keyboard.rs @@ -375,8 +375,9 @@ impl KeyboardHandle { let (dep, la, lo, gr) = guard.serialize_modifiers(); let keys = guard.serialize_pressed_keys(); guard.with_focused_kbds(|kbd, surface| { - kbd.modifiers(serial, dep, la, lo, gr); kbd.enter(serial, &surface, keys.clone()); + // Modifiers must be send after enter event. + kbd.modifiers(serial, dep, la, lo, gr); }); { let KbdInternal {