diff options
author | 2018-04-25 11:00:56 +0200 | |
---|---|---|
committer | 2018-04-25 11:00:56 +0200 | |
commit | c54097428a8f36e456d203d986d76702bd339066 (patch) | |
tree | ec248905f4c73d8f52c3e2c08ce26decbda2d704 /swaylock/render.c | |
parent | Update wording about unmanaged/unmapped views (diff) | |
parent | Merge pull request #1861 from emersion/swaybar-memory-leaks (diff) | |
download | sway-c54097428a8f36e456d203d986d76702bd339066.tar.gz sway-c54097428a8f36e456d203d986d76702bd339066.tar.zst sway-c54097428a8f36e456d203d986d76702bd339066.zip |
Merge branch 'master' into criteria-commands
Diffstat (limited to 'swaylock/render.c')
-rw-r--r-- | swaylock/render.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/swaylock/render.c b/swaylock/render.c index cd387be5..7d9d25a5 100644 --- a/swaylock/render.c +++ b/swaylock/render.c | |||
@@ -43,6 +43,7 @@ void render_frame(struct swaylock_surface *surface) { | |||
43 | cairo_arc(cairo, buffer_width / 2, buffer_height / 2, arc_radius, 0, 2 * M_PI); | 43 | cairo_arc(cairo, buffer_width / 2, buffer_height / 2, arc_radius, 0, 2 * M_PI); |
44 | switch (state->auth_state) { | 44 | switch (state->auth_state) { |
45 | case AUTH_STATE_INPUT: | 45 | case AUTH_STATE_INPUT: |
46 | case AUTH_STATE_INPUT_NOP: | ||
46 | case AUTH_STATE_BACKSPACE: { | 47 | case AUTH_STATE_BACKSPACE: { |
47 | cairo_set_source_rgba(cairo, 0, 0, 0, 0.75); | 48 | cairo_set_source_rgba(cairo, 0, 0, 0, 0.75); |
48 | cairo_fill_preserve(cairo); | 49 | cairo_fill_preserve(cairo); |
@@ -61,6 +62,12 @@ void render_frame(struct swaylock_surface *surface) { | |||
61 | cairo_set_source_rgb(cairo, 125.0 / 255, 51.0 / 255, 0); | 62 | cairo_set_source_rgb(cairo, 125.0 / 255, 51.0 / 255, 0); |
62 | cairo_stroke(cairo); | 63 | cairo_stroke(cairo); |
63 | } break; | 64 | } break; |
65 | case AUTH_STATE_CLEAR: { | ||
66 | cairo_set_source_rgba(cairo, 229.0/255, 164.0/255, 69.0/255, 0.75); | ||
67 | cairo_fill_preserve(cairo); | ||
68 | cairo_set_source_rgb(cairo, 229.0/255, 164.0/255, 69.0/255); | ||
69 | cairo_stroke(cairo); | ||
70 | } break; | ||
64 | default: break; | 71 | default: break; |
65 | } | 72 | } |
66 | 73 | ||
@@ -77,6 +84,15 @@ void render_frame(struct swaylock_surface *surface) { | |||
77 | case AUTH_STATE_INVALID: | 84 | case AUTH_STATE_INVALID: |
78 | text = "wrong"; | 85 | text = "wrong"; |
79 | break; | 86 | break; |
87 | case AUTH_STATE_CLEAR: | ||
88 | text = "cleared"; | ||
89 | break; | ||
90 | case AUTH_STATE_INPUT: | ||
91 | case AUTH_STATE_INPUT_NOP: | ||
92 | if (state->xkb.caps_lock) { | ||
93 | text = "Caps Lock"; | ||
94 | cairo_set_source_rgb(cairo, 229.0/255, 164.0/255, 69.0/255); | ||
95 | } | ||
80 | default: break; | 96 | default: break; |
81 | } | 97 | } |
82 | 98 | ||