aboutsummaryrefslogtreecommitdiff
path: root/swaylock
diff options
context:
space:
mode:
authorJulius Michaelis <gitter@liftm.de>2016-03-24 19:31:48 +0100
committerJulius Michaelis <gitter@liftm.de>2016-03-24 19:41:33 +0100
commit956ca66d2c9ea4408b9bf432d4103050856b1365 (patch)
treeb06553c361d7feca2f4ac036327d148aa8e15dbf /swaylock
parentfb4fdf5336b32e7354110b3d526b8037fefbbf8e (diff)
swaylock: Interpret XKB_KEY_BackSpace as a deletion instead of a normal key.
Diffstat (limited to 'swaylock')
-rw-r--r--swaylock/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/swaylock/main.c b/swaylock/main.c
index 3f0fc867..feb64975 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -108,6 +108,14 @@ void notify_key(enum wl_keyboard_key_state state, xkb_keysym_t sym, uint32_t cod
password = malloc(password_size);
password[0] = '\0';
break;
+ case XKB_KEY_BackSpace:
+ {
+ int i = strlen(password);
+ if (i > 0) {
+ password[i - 1] = '\0';
+ }
+ break;
+ }
default:
{
int i = strlen(password);