]> git.sur5r.net Git - i3/i3lock/blobdiff - unlock_indicator.c
display error when backspace is pressed without any input (#172)
[i3/i3lock] / unlock_indicator.c
index c6793d81b18c7317dcce656f1b337ad5aa11e2ba..da1a7f23663c3ced725be12311d60be243b24c4b 100644 (file)
@@ -164,6 +164,10 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
                 cairo_set_source_rgba(ctx, 250.0 / 255, 0, 0, 0.75);
                 break;
             default:
+                if (unlock_state == STATE_NOTHING_TO_DELETE) {
+                    cairo_set_source_rgba(ctx, 250.0 / 255, 0, 0, 0.75);
+                    break;
+                }
                 cairo_set_source_rgba(ctx, 0, 0, 0, 0.75);
                 break;
         }
@@ -179,6 +183,11 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
                 cairo_set_source_rgb(ctx, 125.0 / 255, 51.0 / 255, 0);
                 break;
             case STATE_AUTH_IDLE:
+                if (unlock_state == STATE_NOTHING_TO_DELETE) {
+                    cairo_set_source_rgb(ctx, 125.0 / 255, 51.0 / 255, 0);
+                    break;
+                }
+
                 cairo_set_source_rgb(ctx, 51.0 / 255, 125.0 / 255, 0);
                 break;
         }
@@ -219,6 +228,9 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
                 text = "lock failed!";
                 break;
             default:
+                if (unlock_state == STATE_NOTHING_TO_DELETE) {
+                    text = "no input";
+                }
                 if (show_failed_attempts && failed_attempts > 0) {
                     if (failed_attempts > 999) {
                         text = "> 999";