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.
This commit is contained in:
Kirill Chibisov 2020-06-13 20:26:43 +03:00 committed by Victor Berger
parent 44570700fb
commit 102f41c1e1
1 changed files with 2 additions and 1 deletions

View File

@ -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 {