diff options
author | eplanet <emeric.planet@gmail.com> | 2016-09-28 03:39:52 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-09-27 18:39:52 -0700 |
commit | 1c97a8484723b7db6c96c3b7bfa4c86c26f47b5a (patch) | |
tree | 0b25192dc3cd1d9fb0151d58174755292cd891f5 /unlock_indicator.c | |
parent | fd2215b0f08991f0f710533b122a182438ff2237 (diff) |
Displaying locking message when grabbing the pointer/keyboard. (#88)
Display "locking…" message when grabbing the pointer/keyboard,
after at least 250 ms of unfruitful attempts. If grabbing
eventually fails, application will not fork and return 1.
Diffstat (limited to 'unlock_indicator.c')
-rw-r--r-- | unlock_indicator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unlock_indicator.c b/unlock_indicator.c index 7e697b0..ee3f0cc 100644 --- a/unlock_indicator.c +++ b/unlock_indicator.c @@ -156,6 +156,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { * (currently verifying, wrong password, or default) */ switch (pam_state) { case STATE_PAM_VERIFY: + case STATE_PAM_LOCK: cairo_set_source_rgba(ctx, 0, 114.0 / 255, 255.0 / 255, 0.75); break; case STATE_PAM_WRONG: @@ -169,6 +170,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { switch (pam_state) { case STATE_PAM_VERIFY: + case STATE_PAM_LOCK: cairo_set_source_rgb(ctx, 51.0 / 255, 0, 250.0 / 255); break; case STATE_PAM_WRONG: @@ -205,6 +207,9 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { case STATE_PAM_VERIFY: text = "verifying…"; break; + case STATE_PAM_LOCK: + text = "locking…"; + break; case STATE_PAM_WRONG: text = "wrong!"; break; |