diff options
author | Daniel Friesel <derf@finalrewind.org> | 2014-04-26 14:53:51 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2014-04-26 14:53:51 +0200 |
commit | a670991d2c957a599f0db6badb28e7fa503347b5 (patch) | |
tree | 6a1493656c835ad1273971f9efd3c68053221d9c /src | |
parent | c07a9474ed54fb7eda17b801770cf65acda9ba7f (diff) |
respect --image-bg=checks in fullscreen mode (closes #156)
Diffstat (limited to 'src')
-rw-r--r-- | src/feh.h | 2 | ||||
-rw-r--r-- | src/winwidget.c | 14 |
2 files changed, 12 insertions, 4 deletions
@@ -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); } |