aboutsummaryrefslogtreecommitdiff
path: root/swaylock/render.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-25 11:00:56 +0200
committerGitHub <noreply@github.com>2018-04-25 11:00:56 +0200
commitc54097428a8f36e456d203d986d76702bd339066 (patch)
treeec248905f4c73d8f52c3e2c08ce26decbda2d704 /swaylock/render.c
parentdfc26c664f8c1b007f15ff24a3055774af200c69 (diff)
parent75674295504af9118d2af3c8677d8e1e84e85e77 (diff)
Merge branch 'master' into criteria-commands
Diffstat (limited to 'swaylock/render.c')
-rw-r--r--swaylock/render.c16
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) {
cairo_arc(cairo, buffer_width / 2, buffer_height / 2, arc_radius, 0, 2 * M_PI);
switch (state->auth_state) {
case AUTH_STATE_INPUT:
+ case AUTH_STATE_INPUT_NOP:
case AUTH_STATE_BACKSPACE: {
cairo_set_source_rgba(cairo, 0, 0, 0, 0.75);
cairo_fill_preserve(cairo);
@@ -61,6 +62,12 @@ void render_frame(struct swaylock_surface *surface) {
cairo_set_source_rgb(cairo, 125.0 / 255, 51.0 / 255, 0);
cairo_stroke(cairo);
} break;
+ case AUTH_STATE_CLEAR: {
+ cairo_set_source_rgba(cairo, 229.0/255, 164.0/255, 69.0/255, 0.75);
+ cairo_fill_preserve(cairo);
+ cairo_set_source_rgb(cairo, 229.0/255, 164.0/255, 69.0/255);
+ cairo_stroke(cairo);
+ } break;
default: break;
}
@@ -77,6 +84,15 @@ void render_frame(struct swaylock_surface *surface) {
case AUTH_STATE_INVALID:
text = "wrong";
break;
+ case AUTH_STATE_CLEAR:
+ text = "cleared";
+ break;
+ case AUTH_STATE_INPUT:
+ case AUTH_STATE_INPUT_NOP:
+ if (state->xkb.caps_lock) {
+ text = "Caps Lock";
+ cairo_set_source_rgb(cairo, 229.0/255, 164.0/255, 69.0/255);
+ }
default: break;
}