]> git.sur5r.net Git - i3/i3lock/commitdiff
Bugfix: Fix background color when using cairo (Thanks Pascal)
authorMichael Stapelberg <michael@stapelberg.de>
Mon, 26 Mar 2012 16:59:41 +0000 (18:59 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 26 Mar 2012 16:59:41 +0000 (18:59 +0200)
unlock_indicator.c

index 1775c15495ae662b467bbf5bc8847360bcd111b8..d603531e2cd14d74f281ba65b8d9eebe90083c74 100644 (file)
@@ -113,7 +113,7 @@ xcb_pixmap_t draw_image(uint32_t *resolution) {
         uint32_t rgb16[3] = {(strtol(strgroups[0], NULL, 16)),
                              (strtol(strgroups[1], NULL, 16)),
                              (strtol(strgroups[2], NULL, 16))};
-        cairo_set_source_rgb(xcb_ctx, rgb16[0], rgb16[1], rgb16[2]);
+        cairo_set_source_rgb(xcb_ctx, rgb16[0] / 255.0, rgb16[1] / 255.0, rgb16[2] / 255.0);
         cairo_rectangle(xcb_ctx, 0, 0, resolution[0], resolution[1]);
         cairo_fill(xcb_ctx);
     }