From 0f09940c327dc4f3feffc48d256181b9d77746da Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 11 Jul 2024 12:10:45 +0200 Subject: [PATCH] fix xwayland crash thanks ikalco --- src/devices/IKeyboard.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/devices/IKeyboard.cpp b/src/devices/IKeyboard.cpp index 125381ba..3e69bfd8 100644 --- a/src/devices/IKeyboard.cpp +++ b/src/devices/IKeyboard.cpp @@ -116,10 +116,9 @@ void IKeyboard::setKeymap(const SStringRuleNames& rules) { if (IDX != XKB_MOD_INVALID) modifiersState.locked |= (uint32_t)1 << IDX; - } - if (modifiersState.locked != 0) - keyboardEvents.modifiers.emit(SModifiersEvent{.locked = modifiersState.locked}); + updateModifiers(modifiersState.depressed, modifiersState.latched, modifiersState.locked, modifiersState.group); + } for (size_t i = 0; i < LEDNAMES.size(); ++i) { ledIndexes.at(i) = xkb_map_led_get_index(xkbKeymap, LEDNAMES.at(i));