summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-02 23:33:25 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-02 23:33:25 +0200
commit39be7968fb3c73ed351b054be051eb37ff716813 (patch)
tree69645aa046113de94d5148bdfd553604209fbdc3 /src
parent262511aee51669b0f6a008eaf9a606b1f237602c (diff)
winwidget.c: Simplify draw_checks
Diffstat (limited to 'src')
-rw-r--r--src/winwidget.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 73b95c8..8851f90 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -621,8 +621,6 @@ Pixmap feh_create_checks(void)
Imlib_Image checks = NULL;
if (checks_pmap == None) {
- int onoff, x, y;
-
checks = imlib_create_image(16, 16);
if (!checks)
@@ -633,18 +631,9 @@ Pixmap feh_create_checks(void)
else if (strncmp(opt.image_bg, "black", 5) == 0)
gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 0, 0, 0, 255);
else {
- for (y = 0; y < 16; y += 8) {
- onoff = (y / 8) & 0x1;
- for (x = 0; x < 16; x += 8) {
- if (onoff)
- gib_imlib_image_fill_rectangle(checks, x, y, 8, 8, 144, 144, 144, 255);
- else
- gib_imlib_image_fill_rectangle(checks, x, y, 8, 8, 100, 100, 100, 255);
- onoff++;
- if (onoff == 2)
- onoff = 0;
- }
- }
+ gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 144, 144, 144, 255);
+ gib_imlib_image_fill_rectangle(checks, 0, 0, 8, 8, 100, 100, 100, 255);
+ gib_imlib_image_fill_rectangle(checks, 8, 8, 8, 8, 100, 100, 100, 255);
}
checks_pmap = XCreatePixmap(disp, root, 16, 16, depth);