diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-03 06:41:41 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-12-03 06:41:41 +0100 |
commit | 308407dc6e46640c3e36049aad7ad6a84ddfdc2a (patch) | |
tree | d74039862e933aab77870f81bfbff10d3e987244 /sys/src/cmd/screenlock.c | |
parent | 61d48161028418fef70fe982804f744b7791093b (diff) |
screenlock: have keyboard activity reset blank timeout
Diffstat (limited to 'sys/src/cmd/screenlock.c')
-rw-r--r-- | sys/src/cmd/screenlock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/screenlock.c b/sys/src/cmd/screenlock.c index cbf4b9b8f..b010a0c17 100644 --- a/sys/src/cmd/screenlock.c +++ b/sys/src/cmd/screenlock.c @@ -24,7 +24,7 @@ readline(char *buf, int nbuf) int i; i = 0; - while(i < nbuf-1) + while(i < nbuf-1){ if(read(0, &c, 1) != 1 || c == '\04' || c == '\177'){ i = 0; break; @@ -36,6 +36,8 @@ readline(char *buf, int nbuf) i = 0; else buf[i++] = c; + blank = time(0); + } buf[i] = '\0'; } @@ -62,8 +64,6 @@ checkpassword(void) break; auth_freeAI(ai); - blank = time(0); - border(screen, screen->r, 8, display->black, ZP); flushimage(display, 1); } |