summaryrefslogtreecommitdiff
path: root/src/winwidget.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-09-13 17:42:16 +0200
committerDaniel Friesel <derf@finalrewind.org>2011-09-13 17:42:16 +0200
commit2e017bbfbf3e9554bd54b98d11c5532d55b02f6c (patch)
tree46ad0f48dfcc71d01163f4361449f55fa4e60642 /src/winwidget.c
parentaf2a44237a7b5cebbf0d03375ed742809da15a59 (diff)
Use enum for opt.image_bg, rename --image-bg default to --image-bg checks
Diffstat (limited to 'src/winwidget.c')
-rw-r--r--src/winwidget.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/winwidget.c b/src/winwidget.c
index 8851f90..bc530ee 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -350,7 +350,7 @@ void winwidget_setup_pixmaps(winwidget winwid)
if (winwid->gc == None) {
XGCValues gcval;
- if (!strcmp(opt.image_bg, "white"))
+ if (opt.image_bg == IMAGE_BG_WHITE)
gcval.foreground = WhitePixel(disp, DefaultScreen(disp));
else
gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
@@ -626,9 +626,9 @@ Pixmap feh_create_checks(void)
if (!checks)
eprintf("Unable to create a teeny weeny imlib image. I detect problems");
- if (strncmp(opt.image_bg, "white", 5) == 0)
+ if (opt.image_bg == IMAGE_BG_WHITE)
gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 255, 255, 255, 255);
- else if (strncmp(opt.image_bg, "black", 5) == 0)
+ else if (opt.image_bg == IMAGE_BG_BLACK)
gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 0, 0, 0, 255);
else {
gib_imlib_image_fill_rectangle(checks, 0, 0, 16, 16, 144, 144, 144, 255);