diff --git a/.cache/clangd/index/background-image.c.A699A680CE5AF112.idx b/.cache/clangd/index/background-image.c.A699A680CE5AF112.idx new file mode 100644 index 0000000..fb54414 Binary files /dev/null and b/.cache/clangd/index/background-image.c.A699A680CE5AF112.idx differ diff --git a/.cache/clangd/index/background-image.h.4A580C6582E21C1F.idx b/.cache/clangd/index/background-image.h.4A580C6582E21C1F.idx new file mode 100644 index 0000000..79c4d7c Binary files /dev/null and b/.cache/clangd/index/background-image.h.4A580C6582E21C1F.idx differ diff --git a/.cache/clangd/index/cairo.c.E344436F853F63EB.idx b/.cache/clangd/index/cairo.c.E344436F853F63EB.idx new file mode 100644 index 0000000..e74a699 Binary files /dev/null and b/.cache/clangd/index/cairo.c.E344436F853F63EB.idx differ diff --git a/.cache/clangd/index/cairo.h.342E0AF4FEE3727B.idx b/.cache/clangd/index/cairo.h.342E0AF4FEE3727B.idx new file mode 100644 index 0000000..dce5ede Binary files /dev/null and b/.cache/clangd/index/cairo.h.342E0AF4FEE3727B.idx differ diff --git a/.cache/clangd/index/comm.c.73286785A4D170DD.idx b/.cache/clangd/index/comm.c.73286785A4D170DD.idx new file mode 100644 index 0000000..b7c85ae Binary files /dev/null and b/.cache/clangd/index/comm.c.73286785A4D170DD.idx differ diff --git a/.cache/clangd/index/comm.h.8C272A0376851762.idx b/.cache/clangd/index/comm.h.8C272A0376851762.idx new file mode 100644 index 0000000..2c33b01 Binary files /dev/null and b/.cache/clangd/index/comm.h.8C272A0376851762.idx differ diff --git a/.cache/clangd/index/log.c.05ED616AC36DC369.idx b/.cache/clangd/index/log.c.05ED616AC36DC369.idx new file mode 100644 index 0000000..fbc204a Binary files /dev/null and b/.cache/clangd/index/log.c.05ED616AC36DC369.idx differ diff --git a/.cache/clangd/index/log.h.163B53264720A899.idx b/.cache/clangd/index/log.h.163B53264720A899.idx new file mode 100644 index 0000000..7938de8 Binary files /dev/null and b/.cache/clangd/index/log.h.163B53264720A899.idx differ diff --git a/.cache/clangd/index/loop.c.329BF8B535D2F2D3.idx b/.cache/clangd/index/loop.c.329BF8B535D2F2D3.idx new file mode 100644 index 0000000..521bb05 Binary files /dev/null and b/.cache/clangd/index/loop.c.329BF8B535D2F2D3.idx differ diff --git a/.cache/clangd/index/loop.h.C9AD589E1F926DF5.idx b/.cache/clangd/index/loop.h.C9AD589E1F926DF5.idx new file mode 100644 index 0000000..72f6e42 Binary files /dev/null and b/.cache/clangd/index/loop.h.C9AD589E1F926DF5.idx differ diff --git a/.cache/clangd/index/main.c.AF20778E2016D176.idx b/.cache/clangd/index/main.c.AF20778E2016D176.idx new file mode 100644 index 0000000..3979070 Binary files /dev/null and b/.cache/clangd/index/main.c.AF20778E2016D176.idx differ diff --git a/.cache/clangd/index/pam.c.0E41B2E6C8458115.idx b/.cache/clangd/index/pam.c.0E41B2E6C8458115.idx new file mode 100644 index 0000000..47652b6 Binary files /dev/null and b/.cache/clangd/index/pam.c.0E41B2E6C8458115.idx differ diff --git a/.cache/clangd/index/password-buffer.c.C44E0D22E8158DF6.idx b/.cache/clangd/index/password-buffer.c.C44E0D22E8158DF6.idx new file mode 100644 index 0000000..7bc5485 Binary files /dev/null and b/.cache/clangd/index/password-buffer.c.C44E0D22E8158DF6.idx differ diff --git a/.cache/clangd/index/password-buffer.h.0E433B83B52CDA60.idx b/.cache/clangd/index/password-buffer.h.0E433B83B52CDA60.idx new file mode 100644 index 0000000..301d378 Binary files /dev/null and b/.cache/clangd/index/password-buffer.h.0E433B83B52CDA60.idx differ diff --git a/.cache/clangd/index/password.c.4F88FCB3E461FF04.idx b/.cache/clangd/index/password.c.4F88FCB3E461FF04.idx new file mode 100644 index 0000000..4f0d27a Binary files /dev/null and b/.cache/clangd/index/password.c.4F88FCB3E461FF04.idx differ diff --git a/.cache/clangd/index/pool-buffer.c.22AB6EED079D870E.idx b/.cache/clangd/index/pool-buffer.c.22AB6EED079D870E.idx new file mode 100644 index 0000000..fad3133 Binary files /dev/null and b/.cache/clangd/index/pool-buffer.c.22AB6EED079D870E.idx differ diff --git a/.cache/clangd/index/pool-buffer.h.C14AF81A129F5DB4.idx b/.cache/clangd/index/pool-buffer.h.C14AF81A129F5DB4.idx new file mode 100644 index 0000000..f90d030 Binary files /dev/null and b/.cache/clangd/index/pool-buffer.h.C14AF81A129F5DB4.idx differ diff --git a/.cache/clangd/index/render.c.13EB6E5145CB95B7.idx b/.cache/clangd/index/render.c.13EB6E5145CB95B7.idx new file mode 100644 index 0000000..4c5d377 Binary files /dev/null and b/.cache/clangd/index/render.c.13EB6E5145CB95B7.idx differ diff --git a/.cache/clangd/index/seat.c.38F333AB815B9F70.idx b/.cache/clangd/index/seat.c.38F333AB815B9F70.idx new file mode 100644 index 0000000..c81777b Binary files /dev/null and b/.cache/clangd/index/seat.c.38F333AB815B9F70.idx differ diff --git a/.cache/clangd/index/seat.h.CD2AD8DC89290134.idx b/.cache/clangd/index/seat.h.CD2AD8DC89290134.idx new file mode 100644 index 0000000..9d1bb10 Binary files /dev/null and b/.cache/clangd/index/seat.h.CD2AD8DC89290134.idx differ diff --git a/.cache/clangd/index/swaylock.h.95A06467DB74471E.idx b/.cache/clangd/index/swaylock.h.95A06467DB74471E.idx new file mode 100644 index 0000000..45690e9 Binary files /dev/null and b/.cache/clangd/index/swaylock.h.95A06467DB74471E.idx differ diff --git a/.cache/clangd/index/unicode.c.413FCBB14E30CA31.idx b/.cache/clangd/index/unicode.c.413FCBB14E30CA31.idx new file mode 100644 index 0000000..7c41d7c Binary files /dev/null and b/.cache/clangd/index/unicode.c.413FCBB14E30CA31.idx differ diff --git a/.cache/clangd/index/unicode.h.536734CA745EA333.idx b/.cache/clangd/index/unicode.h.536734CA745EA333.idx new file mode 100644 index 0000000..736e8cf Binary files /dev/null and b/.cache/clangd/index/unicode.h.536734CA745EA333.idx differ diff --git a/include/swaylock.h b/include/swaylock.h index 6561461..32929e5 100644 --- a/include/swaylock.h +++ b/include/swaylock.h @@ -141,6 +141,7 @@ void render(struct swaylock_surface *surface); void damage_state(struct swaylock_state *state); void clear_password_buffer(struct swaylock_password *pw); void schedule_auth_idle(struct swaylock_state *state); +void schedule_auth_idle_msg(struct swaylock_state *state); void initialize_pw_backend(int argc, char **argv); void run_pw_backend_child(void); diff --git a/main.c b/main.c index 684984c..734c6ca 100644 --- a/main.c +++ b/main.c @@ -1049,18 +1049,14 @@ static void comm_in(int fd, short mask, void *data) { damage_state(&state); } else if (reply.kind == REPLY_CONTINUE) { state.auth_state = AUTH_STATE_IDLE; - schedule_indicator_clear(&state); + schedule_auth_idle(&state); damage_state(&state); } else if (reply.kind == REPLY_MSG) { state.auth_state = AUTH_STATE_IDLE_MSG; memcpy(&state.pam_msg[0], &reply.pam_msg[0], 256); - schedule_indicator_clear(&state); + schedule_auth_idle_msg(&state); damage_state(&state); } - struct swaylock_surface *surface; - wl_list_for_each(surface, &state.surfaces, link) { - render_frame(surface); - } } static void term_in(int fd, short mask, void *data) { diff --git a/password.c b/password.c index 5349e13..8368b8c 100644 --- a/password.c +++ b/password.c @@ -60,6 +60,13 @@ static void set_auth_idle(void *data) { damage_state(state); } +static void set_auth_idle_msg(void *data) { + struct swaylock_state *state = data; + state->auth_idle_timer = NULL; + state->auth_state = AUTH_STATE_IDLE_MSG; + damage_state(state); +} + static void schedule_input_idle(struct swaylock_state *state) { if (state->input_idle_timer) { loop_remove_timer(state->eventloop, state->input_idle_timer); @@ -83,6 +90,14 @@ void schedule_auth_idle(struct swaylock_state *state) { state->eventloop, 3000, set_auth_idle, state); } +void schedule_auth_idle_msg(struct swaylock_state *state) { + if (state->auth_idle_timer) { + loop_remove_timer(state->eventloop, state->auth_idle_timer); + } + state->auth_idle_timer = loop_add_timer( + state->eventloop, 3000, set_auth_idle_msg, state); +} + static void clear_password(void *data) { struct swaylock_state *state = data; state->clear_password_timer = NULL;