diff options
author | 2016-03-31 07:59:21 -0400 | |
---|---|---|
committer | 2016-03-31 07:59:21 -0400 | |
commit | d94d46fe6969f4c0dfe7031b1a4b987a6cd04a51 (patch) | |
tree | 931ad53909891f036136dfa26ba9595f9d818b01 /swaylock/main.c | |
parent | Merge pull request #560 from mikkeloscar/add-new_window-new_float (diff) | |
parent | swaylock: improve graphical feedback (diff) | |
download | sway-d94d46fe6969f4c0dfe7031b1a4b987a6cd04a51.tar.gz sway-d94d46fe6969f4c0dfe7031b1a4b987a6cd04a51.tar.zst sway-d94d46fe6969f4c0dfe7031b1a4b987a6cd04a51.zip |
Merge pull request #561 from fluxchief/swaylock
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) { | |||
583 | 583 | ||
584 | // Typing indicator: Highlight random part on keypress | 584 | // Typing indicator: Highlight random part on keypress |
585 | if (render_data->auth_state == AUTH_STATE_INPUT || render_data->auth_state == AUTH_STATE_BACKSPACE) { | 585 | if (render_data->auth_state == AUTH_STATE_INPUT || render_data->auth_state == AUTH_STATE_BACKSPACE) { |
586 | double highlight_start = (rand() % (int)(2 * M_PI * 100)) / 100.0; | 586 | static double highlight_start = 0; |
587 | highlight_start += (rand() % (int)(M_PI * 100)) / 100.0 + M_PI * 0.5; | ||
587 | cairo_arc(window->cairo, window->width/2, window->height/2, ARC_RADIUS, highlight_start, highlight_start + TYPE_INDICATOR_RANGE); | 588 | cairo_arc(window->cairo, window->width/2, window->height/2, ARC_RADIUS, highlight_start, highlight_start + TYPE_INDICATOR_RANGE); |
588 | if (render_data->auth_state == AUTH_STATE_INPUT) { | 589 | if (render_data->auth_state == AUTH_STATE_INPUT) { |
589 | cairo_set_source_rgb(window->cairo, 51.0 / 255, 219.0 / 255, 0); | 590 | cairo_set_source_rgb(window->cairo, 51.0 / 255, 219.0 / 255, 0); |