i3 - improved tiling WM


Add ctrl+u password reset

Patch status: merged

Patch by Philip Dexter

To apply this patch, use:
curl http://cr.i3wm.org/patch/111/raw.patch | git am

b/i3lock.c

13
@@ -239,8 +239,10 @@ static void handle_key_press(xcb_key_press_event_t *event) {
14
     xkb_keysym_t ksym;
15
     char buffer[128];
16
     int n;
17
+    bool ctrl;
18
 
19
     ksym = xkb_state_key_get_one_sym(xkb_state, event->detail);
20
+    ctrl = xkb_state_mod_name_is_active(xkb_state, "Control", XKB_STATE_MODS_DEPRESSED);
21
     xkb_state_update_key(xkb_state, event->detail, XKB_KEY_DOWN);
22
 
23
     /* The buffer will be null-terminated, so n >= 2 for 1 actual character. */
24
@@ -255,6 +257,9 @@ static void handle_key_press(xcb_key_press_event_t *event) {
25
         unlock_state = STATE_KEY_PRESSED;
26
         redraw_screen();
27
         input_done();
28
+    case XKB_KEY_u:
29
+        if (!ctrl)
30
+            break;
31
     case XKB_KEY_Escape:
32
         input_position = 0;
33
         clear_password_memory();