First press of ESC key clear the password, then offs display.
This commit is contained in:
@@ -239,7 +239,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
||||
if(passing)
|
||||
continue;
|
||||
|
||||
if(ksym == XK_Escape) {
|
||||
if(len == 0 && ksym == XK_Escape) {
|
||||
dspon = !is_screen_on(dpy);
|
||||
continue;
|
||||
}
|
||||
@@ -259,10 +259,10 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
||||
explicit_bzero(&passwd, sizeof(passwd));
|
||||
len = 0;
|
||||
break;
|
||||
/*case XK_Escape:
|
||||
case XK_Escape:
|
||||
explicit_bzero(&passwd, sizeof(passwd));
|
||||
len = 0;
|
||||
break;*/
|
||||
break;
|
||||
case XK_BackSpace:
|
||||
if (len)
|
||||
passwd[--len] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user