i3lock-color

The world's most popular non-default computer lockscreen.
Index Commits Files Refs README LICENSE
commit 7fdb32a6be218c1eb5516abdd5bdc18ae0ca39f7
parent aa906d564c6980d8020879769d4156d6a0c3453e
Author: Chris Guillott <chris@techfo.xyz>
Date:   Tue, 30 May 2017 18:58:18 -0400

bugfix

I am bad at testing things.

Diffstat:
Munlock_indicator.c | 34++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/unlock_indicator.c b/unlock_indicator.c
@@ -165,23 +165,25 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
     cairo_surface_t *xcb_output = cairo_xcb_surface_create(conn, bg_pixmap, vistype, resolution[0], resolution[1]);
     cairo_t *xcb_ctx = cairo_create(xcb_output);
 
-    if (blur_img) {
-        cairo_set_source_surface(xcb_ctx, blur_img, 0, 0);
-        cairo_paint(xcb_ctx);
-    }
-    if (img) {
-        if (!tile) {
-            cairo_set_source_surface(xcb_ctx, img, 0, 0);
+    if (blur_img || img) {
+        if (blur_img) {
+            cairo_set_source_surface(xcb_ctx, blur_img, 0, 0);
             cairo_paint(xcb_ctx);
-        } else {
-            /* create a pattern and fill a rectangle as big as the screen */
-            cairo_pattern_t *pattern;
-            pattern = cairo_pattern_create_for_surface(img);
-            cairo_set_source(xcb_ctx, pattern);
-            cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT);
-            cairo_rectangle(xcb_ctx, 0, 0, resolution[0], resolution[1]);
-            cairo_fill(xcb_ctx);
-            cairo_pattern_destroy(pattern);
+        }
+        if (img) {
+            if (!tile) {
+                cairo_set_source_surface(xcb_ctx, img, 0, 0);
+                cairo_paint(xcb_ctx);
+            } else {
+                /* create a pattern and fill a rectangle as big as the screen */
+                cairo_pattern_t *pattern;
+                pattern = cairo_pattern_create_for_surface(img);
+                cairo_set_source(xcb_ctx, pattern);
+                cairo_pattern_set_extend(pattern, CAIRO_EXTEND_REPEAT);
+                cairo_rectangle(xcb_ctx, 0, 0, resolution[0], resolution[1]);
+                cairo_fill(xcb_ctx);
+                cairo_pattern_destroy(pattern);
+            }
         }
     } else {
         char strgroups[3][3] = {{color[0], color[1], '\0'},