diff options
author | Kevin Hamacher <kevin.hamacher@ruhr-uni-bochum.de> | 2016-03-31 13:49:59 +0200 |
---|---|---|
committer | Kevin Hamacher <kevin.hamacher@ruhr-uni-bochum.de> | 2016-03-31 13:49:59 +0200 |
commit | ce22ea1526a8a472bc2d30132d106ccd4e8ad35c (patch) | |
tree | 931ad53909891f036136dfa26ba9595f9d818b01 /swaylock/main.c | |
parent | f0b33df3848e46a013aaab184364a46d3c35e1c7 (diff) |
swaylock: improve graphical feedback
Diffstat (limited to 'swaylock/main.c')
-rw-r--r-- | swaylock/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/swaylock/main.c b/swaylock/main.c index 34f9d9aa..8e920fce 100644 --- a/swaylock/main.c +++ b/swaylock/main.c @@ -583,7 +583,8 @@ void render(struct render_data *render_data) { // Typing indicator: Highlight random part on keypress if (render_data->auth_state == AUTH_STATE_INPUT || render_data->auth_state == AUTH_STATE_BACKSPACE) { - double highlight_start = (rand() % (int)(2 * M_PI * 100)) / 100.0; + static double highlight_start = 0; + highlight_start += (rand() % (int)(M_PI * 100)) / 100.0 + M_PI * 0.5; cairo_arc(window->cairo, window->width/2, window->height/2, ARC_RADIUS, highlight_start, highlight_start + TYPE_INDICATOR_RANGE); if (render_data->auth_state == AUTH_STATE_INPUT) { cairo_set_source_rgb(window->cairo, 51.0 / 255, 219.0 / 255, 0); |