summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-04-26 14:53:51 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-04-26 14:53:51 +0200
commita670991d2c957a599f0db6badb28e7fa503347b5 (patch)
tree6a1493656c835ad1273971f9efd3c68053221d9c /src
parentc07a9474ed54fb7eda17b801770cf65acda9ba7f (diff)
respect --image-bg=checks in fullscreen mode (closes #156)
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);
}