1
0
mirror of https://github.com/tiyn/slock.git synced 2026-02-22 07:14:48 +01:00

added control-clear patch

This commit is contained in:
2023-10-26 02:36:52 +02:00
parent 3922b40c0a
commit 6b5d4811eb
3 changed files with 33 additions and 2 deletions

View File

@@ -180,8 +180,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
passwd[--len] = '\0';
break;
default:
if (num && !iscntrl((int)buf[0]) &&
(len + num < sizeof(passwd))) {
if (controlkeyclear && iscntrl((int)buf[0]))
continue;
if (num && (len + num < sizeof(passwd))) {
memcpy(passwd + len, buf, num);
len += num;
}