summaryrefslogtreecommitdiff
path: root/src/managers/input/InputManager.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-04 18:46:28 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-09-04 18:46:28 +0200
commit7a3b57c99c1501055512174f94840153f4e65c71 (patch)
tree5be830b489d2d60e15e0ee5d61863cd20f297d2b /src/managers/input/InputManager.cpp
parentba0c5fe0bba9ac671f4238b968e4728671eef3f8 (diff)
send accumulated modifiers to surfaces
Diffstat (limited to 'src/managers/input/InputManager.cpp')
-rw-r--r--src/managers/input/InputManager.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp
index af950b5b..bdf33969 100644
--- a/src/managers/input/InputManager.cpp
+++ b/src/managers/input/InputManager.cpp
@@ -794,12 +794,17 @@ void CInputManager::onKeyboardKey(wlr_keyboard_key_event* e, SKeyboard* pKeyboar
void CInputManager::onKeyboardMod(void* data, SKeyboard* pKeyboard) {
const auto PIMEGRAB = m_sIMERelay.getIMEKeyboardGrab(pKeyboard);
+ const auto ALLMODS = accumulateModsFromAllKBs();
+
+ auto MODS = wlr_keyboard_from_input_device(pKeyboard->keyboard)->modifiers;
+ MODS.depressed = ALLMODS;
+
if (PIMEGRAB && PIMEGRAB->pWlrKbGrab && PIMEGRAB->pWlrKbGrab->input_method) {
wlr_input_method_keyboard_grab_v2_set_keyboard(PIMEGRAB->pWlrKbGrab, wlr_keyboard_from_input_device(pKeyboard->keyboard));
- wlr_input_method_keyboard_grab_v2_send_modifiers(PIMEGRAB->pWlrKbGrab, &wlr_keyboard_from_input_device(pKeyboard->keyboard)->modifiers);
+ wlr_input_method_keyboard_grab_v2_send_modifiers(PIMEGRAB->pWlrKbGrab, &MODS);
} else {
wlr_seat_set_keyboard(g_pCompositor->m_sSeat.seat, wlr_keyboard_from_input_device(pKeyboard->keyboard));
- wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sSeat.seat, &wlr_keyboard_from_input_device(pKeyboard->keyboard)->modifiers);
+ wlr_seat_keyboard_notify_modifiers(g_pCompositor->m_sSeat.seat, &MODS);
}
const auto PWLRKB = wlr_keyboard_from_input_device(pKeyboard->keyboard);