diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2015-12-25 22:10:06 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2015-12-25 22:10:06 +0100 |
commit | 59705b05b5533bcb78d4c92966379914aa7b656d (patch) | |
tree | 6a5bbb31a99ee679556959d43121f5955f7a8ad4 /unlock_indicator.c | |
parent | 0bdc0c644d5435115e0d659f1a8e8ec6bcf38000 (diff) |
Show unlock indicator if password was entered during PAM verification
fixes #51
Diffstat (limited to 'unlock_indicator.c')
-rw-r--r-- | unlock_indicator.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unlock_indicator.c b/unlock_indicator.c index a81cef8..3b94d17 100644 --- a/unlock_indicator.c +++ b/unlock_indicator.c @@ -140,7 +140,8 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { cairo_fill(xcb_ctx); } - if (unlock_state >= STATE_KEY_PRESSED && unlock_indicator) { + if (unlock_indicator && + (unlock_state >= STATE_KEY_PRESSED || pam_state > STATE_PAM_IDLE)) { cairo_scale(ctx, scaling_factor(), scaling_factor()); /* Draw a (centered) circle with transparent background. */ cairo_set_line_width(ctx, 10.0); @@ -322,6 +323,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) { * */ void redraw_screen(void) { + DEBUG("redraw_screen(unlock_state = %d, pam_state = %d)\n", unlock_state, pam_state); xcb_pixmap_t bg_pixmap = draw_image(last_resolution); xcb_change_window_attributes(conn, win, XCB_CW_BACK_PIXMAP, (uint32_t[1]){bg_pixmap}); /* XXX: Possible optimization: Only update the area in the middle of the |