aboutsummaryrefslogtreecommitdiffstats
path: root/swaylock/password.c
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2018-04-25 11:00:56 +0200
committerLibravatar GitHub <noreply@github.com>2018-04-25 11:00:56 +0200
commitc54097428a8f36e456d203d986d76702bd339066 (patch)
treeec248905f4c73d8f52c3e2c08ce26decbda2d704 /swaylock/password.c
parentUpdate wording about unmanaged/unmapped views (diff)
parentMerge pull request #1861 from emersion/swaybar-memory-leaks (diff)
downloadsway-c54097428a8f36e456d203d986d76702bd339066.tar.gz
sway-c54097428a8f36e456d203d986d76702bd339066.tar.zst
sway-c54097428a8f36e456d203d986d76702bd339066.zip
Merge branch 'master' into criteria-commands
Diffstat (limited to 'swaylock/password.c')
-rw-r--r--swaylock/password.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/swaylock/password.c b/swaylock/password.c
index c8df3de8..1ad5cd81 100644
--- a/swaylock/password.c
+++ b/swaylock/password.c
@@ -105,11 +105,39 @@ void swaylock_handle_key(struct swaylock_state *state,
105 state->auth_state = AUTH_STATE_INVALID; 105 state->auth_state = AUTH_STATE_INVALID;
106 render_frames(state); 106 render_frames(state);
107 break; 107 break;
108 case XKB_KEY_Delete:
108 case XKB_KEY_BackSpace: 109 case XKB_KEY_BackSpace:
109 if (backspace(&state->password)) { 110 if (backspace(&state->password)) {
110 state->auth_state = AUTH_STATE_BACKSPACE; 111 state->auth_state = AUTH_STATE_BACKSPACE;
111 render_frames(state); 112 } else {
113 state->auth_state = AUTH_STATE_CLEAR;
112 } 114 }
115 render_frames(state);
116 break;
117 case XKB_KEY_Escape:
118 clear_password_buffer(&state->password);
119 state->auth_state = AUTH_STATE_CLEAR;
120 render_frames(state);
121 break;
122 case XKB_KEY_Caps_Lock:
123 /* The state is getting active after this
124 * so we need to manually toggle it */
125 state->xkb.caps_lock = !state->xkb.caps_lock;
126 state->auth_state = AUTH_STATE_INPUT_NOP;
127 render_frames(state);
128 break;
129 case XKB_KEY_Shift_L:
130 case XKB_KEY_Shift_R:
131 case XKB_KEY_Control_L:
132 case XKB_KEY_Control_R:
133 case XKB_KEY_Meta_L:
134 case XKB_KEY_Meta_R:
135 case XKB_KEY_Alt_L:
136 case XKB_KEY_Alt_R:
137 case XKB_KEY_Super_L:
138 case XKB_KEY_Super_R:
139 state->auth_state = AUTH_STATE_INPUT_NOP;
140 render_frames(state);
113 break; 141 break;
114 default: 142 default:
115 if (codepoint) { 143 if (codepoint) {