]> git.sur5r.net Git - i3/i3lock/commitdiff
Immediately hide the unlock indicator after ESC / C-u (#145)
authorOrestis <orestisf1993@gmail.com>
Sat, 21 Oct 2017 21:15:15 +0000 (00:15 +0300)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Sat, 21 Oct 2017 21:15:15 +0000 (23:15 +0200)
i3lock.c

index 945be9fa1cc4c5a8fb794c733a5a4edb2909fe8f..853862566778165189c54d40041c4393d1f26f15 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -445,14 +445,9 @@ static void handle_key_press(xcb_key_press_event_t *event) {
                 ksym == XKB_KEY_Escape) {
                 DEBUG("C-u pressed\n");
                 clear_input();
-                /* Hide the unlock indicator after a bit if the password buffer is
-                 * empty. */
-                if (unlock_indicator) {
-                    START_TIMER(clear_indicator_timeout, 1.0, clear_indicator_cb);
-                    unlock_state = STATE_BACKSPACE_ACTIVE;
-                    redraw_screen();
-                    unlock_state = STATE_KEY_PRESSED;
-                }
+                /* Also hide the unlock indicator */
+                if (unlock_indicator)
+                    clear_indicator();
                 return;
             }
             break;