summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2021-10-31 17:43:07 +0000
committerPhil Jones <philj56@gmail.com>2021-10-31 17:43:07 +0000
commit8db0dbf823bccb2bc2ea3caee400916891b37948 (patch)
treef5625d5a0de4eea687761f53b69b4bd118618f7e /src/main.c
parent490f2946dd237402267bb0e4a4cb6a874be511d2 (diff)
Also clear entry when Ctrl-C is pressed.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 1385647..9ed471c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -196,7 +196,15 @@ static void wl_keyboard_key(
} else if (entry->password_length > 0 && sym == XKB_KEY_BackSpace) {
entry->password[entry->password_length - 1] = '\0';
entry->password_length--;
- } else if (sym == XKB_KEY_Escape) {
+ } else if (sym == XKB_KEY_Escape
+ || (sym == XKB_KEY_c
+ && xkb_state_mod_name_is_active(
+ client_state->xkb_state,
+ XKB_MOD_NAME_CTRL,
+ XKB_STATE_MODS_EFFECTIVE)
+ )
+ )
+ {
entry->password[0] = '\0';
entry->password_length = 0;
} else if (entry->password_length > 0