diff options
author | eplanet <emeric.planet@gmail.com> | 2016-10-11 22:40:51 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2016-10-11 13:40:51 -0700 |
commit | d2130092cf588c02d7a0e74c0de85dc261b6823b (patch) | |
tree | e31a2c0b2d8dfb791cfad874f12b1d41be36a68c /unlock_indicator.c | |
parent | 1c97a8484723b7db6c96c3b7bfa4c86c26f47b5a (diff) |
Display error message when locking failed (#99)
To give a feedback for when the pointer couldn't be grabbed,
displaying an error message before exiting.
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 ee3f0cc..1483230 100644 --- a/unlock_indicator.c +++ b/unlock_indicator.c @@ -160,6 +160,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { cairo_set_source_rgba(ctx, 0, 114.0 / 255, 255.0 / 255, 0.75); break; case STATE_PAM_WRONG: + case STATE_I3LOCK_LOCK_FAILED: cairo_set_source_rgba(ctx, 250.0 / 255, 0, 0, 0.75); break; default: @@ -174,6 +175,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { cairo_set_source_rgb(ctx, 51.0 / 255, 0, 250.0 / 255); break; case STATE_PAM_WRONG: + case STATE_I3LOCK_LOCK_FAILED: cairo_set_source_rgb(ctx, 125.0 / 255, 51.0 / 255, 0); break; case STATE_PAM_IDLE: @@ -213,6 +215,9 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { case STATE_PAM_WRONG: text = "wrong!"; break; + case STATE_I3LOCK_LOCK_FAILED: + text = "lock failed!"; + break; default: if (show_failed_attempts && failed_attempts > 0) { if (failed_attempts > 999) { |