From 11560381bf54d228aa09aa61bd31135ae0ea9662 Mon Sep 17 00:00:00 2001 From: Abdelhakim Qbaich Date: Sat, 22 Jun 2019 15:33:02 -0400 Subject: [PATCH] Damage state when the keyboard layout changes --- seat.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seat.c b/seat.c index 883d0b6..5cce703 100644 --- a/seat.c +++ b/seat.c @@ -62,6 +62,11 @@ static void keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t group) { struct swaylock_state *state = data; + int layout_same = xkb_state_layout_index_is_active(state->xkb.state, + group, XKB_STATE_LAYOUT_EFFECTIVE); + if (!layout_same) { + damage_state(state); + } xkb_state_update_mask(state->xkb.state, mods_depressed, mods_latched, mods_locked, 0, 0, group); int caps_lock = xkb_state_mod_name_is_active(state->xkb.state,