]> git.sur5r.net Git - i3/i3lock/commitdiff
Keep only the last attempt for retry_verification 192/head
authorGuillaume Maudoux <guillaume.maudoux@uclouvain.be>
Mon, 25 Jun 2018 13:48:45 +0000 (15:48 +0200)
committerGuillaume Maudoux <guillaume.maudoux@uclouvain.be>
Thu, 23 Aug 2018 11:35:20 +0000 (13:35 +0200)
i3lock.c

index 13adc2b43838402d6975eb945cbb94f954c67bd4..fd4d1d294275b54c5bc59ae816914c36676de149 100644 (file)
--- a/i3lock.c
+++ b/i3lock.c
@@ -445,6 +445,12 @@ static void handle_key_press(xcb_key_press_event_t *event) {
             return;
         default:
             skip_repeated_empty_password = false;
             return;
         default:
             skip_repeated_empty_password = false;
+            // A new password is being entered, but a previous one is pending.
+            // Discard the old one and clear the retry_verification flag.
+            if (retry_verification) {
+                retry_verification = false;
+                clear_input();
+            }
     }
 
     switch (ksym) {
     }
 
     switch (ksym) {