summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/feh.h2
-rw-r--r--src/winwidget.c14
2 files changed, 12 insertions, 4 deletions
diff --git a/src/feh.h b/src/feh.h
index cd730e9..2864cad 100644
--- a/src/feh.h
+++ b/src/feh.h
@@ -102,7 +102,7 @@ enum slide_change { SLIDE_NEXT, SLIDE_PREV, SLIDE_RAND, SLIDE_FIRST, SLIDE_LAST,
SLIDE_JUMP_BACK
};
-enum image_bg { IMAGE_BG_CHECKS = 0, IMAGE_BG_BLACK, IMAGE_BG_WHITE };
+enum image_bg { IMAGE_BG_CHECKS = 1, IMAGE_BG_BLACK, IMAGE_BG_WHITE };
#define INPLACE_EDIT_FLIP -1
#define INPLACE_EDIT_MIRROR -2
diff --git a/src/winwidget.c b/src/winwidget.c
index 133aa89..01bb454 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -351,11 +351,19 @@ void winwidget_setup_pixmaps(winwidget winwid)
if (winwid->gc == None) {
XGCValues gcval;
- if (opt.image_bg == IMAGE_BG_WHITE)
+ if (opt.image_bg == IMAGE_BG_WHITE) {
gcval.foreground = WhitePixel(disp, DefaultScreen(disp));
- else
+ winwid->gc = XCreateGC(disp, winwid->win, GCForeground, &gcval);
+ }
+ else if (opt.image_bg == IMAGE_BG_CHECKS) {
+ gcval.tile = feh_create_checks();
+ gcval.fill_style = FillTiled;
+ winwid->gc = XCreateGC(disp, winwid->win, GCTile | GCFillStyle, &gcval);
+ }
+ else {
gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
- winwid->gc = XCreateGC(disp, winwid->win, GCForeground, &gcval);
+ winwid->gc = XCreateGC(disp, winwid->win, GCForeground, &gcval);
+ }
}
winwid->bg_pmap = XCreatePixmap(disp, winwid->win, scr->width, scr->height, depth);
}