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)
|
if(passing)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if(ksym == XK_Escape) {
|
if(len == 0 && ksym == XK_Escape) {
|
||||||
dspon = !is_screen_on(dpy);
|
dspon = !is_screen_on(dpy);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -259,10 +259,10 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
|||||||
explicit_bzero(&passwd, sizeof(passwd));
|
explicit_bzero(&passwd, sizeof(passwd));
|
||||||
len = 0;
|
len = 0;
|
||||||
break;
|
break;
|
||||||
/*case XK_Escape:
|
case XK_Escape:
|
||||||
explicit_bzero(&passwd, sizeof(passwd));
|
explicit_bzero(&passwd, sizeof(passwd));
|
||||||
len = 0;
|
len = 0;
|
||||||
break;*/
|
break;
|
||||||
case XK_BackSpace:
|
case XK_BackSpace:
|
||||||
if (len)
|
if (len)
|
||||||
passwd[--len] = '\0';
|
passwd[--len] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user