From 09141d6a74c9f56cf54a7171c8c3683abfca8a6f Mon Sep 17 00:00:00 2001 From: James Magahern Date: Sat, 22 May 2021 20:15:58 -0700 Subject: Don't show the "Authenticating..." prompt until after a short delay --- src/render.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/render.h') diff --git a/src/render.h b/src/render.h index e80250f..5bc7016 100644 --- a/src/render.h +++ b/src/render.h @@ -18,6 +18,7 @@ #define kMaxAnimations 32 #define kMaxPasswordLength 128 #define kMaxPromptLength 128 +#define kMaxTimers 16 typedef unsigned animation_key_t; #define ANIM_KEY_NOEXIST (kMaxAnimations + 1) @@ -29,6 +30,15 @@ typedef enum { LAYER_PASSWORD = 1 << 3, } layer_type_t; + +typedef unsigned int timer_id; +typedef void (*timer_callback_t)(void *context); +typedef struct { + bool active; + anim_time_interval_t exec_time; + timer_callback_t callback; +} saver_timer_t; + typedef struct { cairo_t *ctx; cairo_surface_t *surface; @@ -53,6 +63,7 @@ typedef struct { bool is_processing; bool is_authenticated; + timer_id show_spinner_timer; RsvgHandle *spinner_svg_handle; animation_key_t spinner_anim_key; @@ -63,6 +74,8 @@ typedef struct { animation_t animations[kMaxAnimations]; unsigned num_animations; + saver_timer_t timers[kMaxTimers]; + layer_type_t dirty_layers; struct auth_handle_t *auth_handle; -- cgit v1.2.3-54-g00ecf