From 84f236d5373c54684b2a8dff7d3d59dd8778b8b6 Mon Sep 17 00:00:00 2001 From: "mathias.gumz" Date: Wed, 8 Oct 2008 06:33:38 +0000 Subject: [PATCH] introduced a 'check' mode (yellow frame) --HG-- extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4084 --- CHANGELOG.txt | 3 +++ src/alock.c | 19 +++++-------------- 2 files changed, 8 insertions(+), 14 deletions(-) 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;