diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-04-19 06:05:15 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-04-19 11:36:13 +0000 |
| commit | ef4a680ae813b23e7b9d1b6dd67413dcad377655 (patch) | |
| tree | c3626fa43595fa5c802310d5d3edf526c0ab19be /input.c | |
| parent | csi: don't allow client app to enable grapheme-shaping when disabled at compile-time (diff) | |
input: reset modifiers in keyboard_leave()
Closes #2034
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -765,9 +765,17 @@ keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, seat->kbd.alt = false; seat->kbd.ctrl = false; seat->kbd.super = false; + if (seat->kbd.xkb_compose_state != NULL) xkb_compose_state_reset(seat->kbd.xkb_compose_state); + if (seat->kbd.xkb_state != NULL && seat->kbd.xkb_keymap != NULL) { + const xkb_layout_index_t layout_count = xkb_keymap_num_layouts(seat->kbd.xkb_keymap); + + for (xkb_layout_index_t i = 0; i < layout_count; i++) + xkb_state_update_mask(seat->kbd.xkb_state, 0, 0, 0, i, i, i); + } + if (old_focused != NULL) { seat->pointer.hidden = false; term_xcursor_update_for_seat(old_focused, seat); |
