diff --git a/CHANGELOG.txt b/CHANGELOG.txt index dbc28bf..a178af7 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,8 @@ Version 1.0 ---------------------------------------------------------------------- +2008-10-08: + * improved visual feedback + 2008-10-04: * first version with visual feedback (still rough) diff --git a/src/alock.c b/src/alock.c index b5f02fe..6a48fea 100644 --- a/src/alock.c +++ b/src/alock.c @@ -284,28 +284,19 @@ static int eventLoop(struct aOpts* opts, struct aXInfo* xi) { rbuf[rlen] = 0; // some auth() methods have their own penalty system - // so we assume that the auth() fails, visualize 'failed' - // for as long as the auth needs. - // - // if it comes back 'ok', the visualization frame is - // destroyed anyway. if it comes back 'false', then - // we would need to show it anyway + we measure the - // auth() penalty time to use it for the timeout. + // so we draw a 'yellow' frame to show 'checking' state. - mode = WRONG; - visualFeedback(frame, mode); + alock_draw_frame(frame, "yellow"); XSync(dpy, True); - XBell(dpy, 0); if (opts->auth->auth(rbuf)) { alock_free_frame(frame); return 1; } - timeout = last_key_time; - if (elapsedTime() - last_key_time < penalty) - timeout += penalty; - + XBell(dpy, 0); + mode = WRONG; + timeout = elapsedTime() + penalty; rlen = 0; break;