diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2010-11-06 18:02:44 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2010-11-06 18:02:44 +0100 |
commit | 3a22727bffbf9519ed81e7cce7a73ed0774788db (patch) | |
tree | 6d1e74213b5a1c8baf3401dfd133808d8036c726 /i3lock.c | |
parent | c3affb1c61d8e9c58b234f48001c7f85e6b4fc6a (diff) |
Bugfix: When entering 512 characters, you could use neither return nor backspace (Thanks carl)
Diffstat (limited to 'i3lock.c')
-rw-r--r-- | i3lock.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -129,9 +129,6 @@ static void handle_key_press(xcb_key_press_event_t *event) { * keysyms, we remove the numlock flag from the event state */ event->state &= ~numlockmask; - if ((input_position + 8) >= sizeof(password)) - return; - xcb_keysym_t sym = xcb_key_press_lookup_keysym(symbols, event, event->state); switch (sym) { case XK_Mode_switch: @@ -157,6 +154,9 @@ static void handle_key_press(xcb_key_press_event_t *event) { return; } + if ((input_position + 8) >= sizeof(password)) + return; + #if 0 /* FIXME: handle all of these? */ printf("is_keypad_key = %d\n", xcb_is_keypad_key(sym)); |