X-Git-Url: https://git.sur5r.net/?p=i3%2Fi3lock;a=blobdiff_plain;f=unlock_indicator.c;h=3b94d1765f2d02bb0c80df4dc8779c41231365c3;hp=a81cef8635deb06132ff76c660013937bc0142cc;hb=59705b05b5533bcb78d4c92966379914aa7b656d;hpb=0bdc0c644d5435115e0d659f1a8e8ec6bcf38000 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