summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2022-01-31 17:35:59 -0500
committerDouglas Rumbaugh <dbr4@psu.edu>2022-01-31 17:35:59 -0500
commit927bc4a9ecb051ea5dcccf5560afa6b5f2d5afb0 (patch)
treee6345b49aafd1e07db821b095886c81f6623a95f
parent0e428683cca2bbd788ac916ba5fe4738344666fb (diff)
downloadslock-927bc4a9ecb051ea5dcccf5560afa6b5f2d5afb0.tar.gz
Fixed colors
-rw-r--r--config.def.h4
-rw-r--r--slock.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index c574485..6c80fd3 100644
--- a/config.def.h
+++ b/config.def.h
@@ -19,11 +19,13 @@ ResourcePref resources[] = {
{ "color0", STRING, &colorname[INIT] },
{ "color4", STRING, &colorname[INPUT] },
{ "color1", STRING, &colorname[FAILED] },
+ { "color3", STRING, &colorname[CAPS] },
+ { "color5", STRING, &colorname[PAM] },
};
/* treat a cleared input like a wrong password (color) */
-static const int failonclear = 1;
+static const int failonclear = 0;
/* PAM service that's used for authentication */
static const char* pam_service = "login";
diff --git a/slock.c b/slock.c
index a165a5e..888dbd1 100644
--- a/slock.c
+++ b/slock.c
@@ -281,6 +281,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
case XK_Escape:
explicit_bzero(&passwd, sizeof(passwd));
len = 0;
+ failure = 0;
break;
case XK_BackSpace:
if (len)