From 76cd3f2642127c1b3a02e863d4d4bf9d5dc34d60 Mon Sep 17 00:00:00 2001 From: Oscar Cowdery Lack Date: Thu, 3 Jan 2019 09:12:01 +1100 Subject: swaylock: Fix caps lock not updating immediately Partially fixes #2788. This change makes it so the lock screen is redrawn whenever the caps lock modifier state changes, rather on relying on the keypress event. This didn't work because caps lock is disabled when the key is released, not pressed, so the caps lock indicator does not go away until the next keypress event. --- swaylock/password.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'swaylock/password.c') diff --git a/swaylock/password.c b/swaylock/password.c index 3059203a..3bd113ad 100644 --- a/swaylock/password.c +++ b/swaylock/password.c @@ -146,14 +146,6 @@ void swaylock_handle_key(struct swaylock_state *state, schedule_indicator_clear(state); break; case XKB_KEY_Caps_Lock: - /* The state is getting active after this - * so we need to manually toggle it */ - state->xkb.caps_lock = !state->xkb.caps_lock; - state->auth_state = AUTH_STATE_INPUT_NOP; - damage_state(state); - schedule_indicator_clear(state); - schedule_password_clear(state); - break; case XKB_KEY_Shift_L: case XKB_KEY_Shift_R: case XKB_KEY_Control_L: -- cgit v1.2.3-54-g00ecf