summaryrefslogtreecommitdiff
path: root/src/wallpaper.c
diff options
context:
space:
mode:
authorDennis Real <github@tildepipe.org>2012-12-19 17:35:46 +0100
committerDennis Real <github@tildepipe.org>2012-12-19 17:35:46 +0100
commit98b0add5231e16a0d8c91eff929374a2131a8124 (patch)
tree130eed8ec87f2b041d869bd23e7f87f7893d3b69 /src/wallpaper.c
parent39f3eab40c73ddc7d7058eadb136f58880538f0e (diff)
parentda09e217570b4c1634a04d73f9d2f871afa2004a (diff)
Merge branch 'master' of git://github.com/derf/feh
Diffstat (limited to 'src/wallpaper.c')
-rw-r--r--src/wallpaper.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/wallpaper.c b/src/wallpaper.c
index df78303..30c3925 100644
--- a/src/wallpaper.c
+++ b/src/wallpaper.c
@@ -190,6 +190,9 @@ static void feh_wm_set_bg_maxed(Pixmap pmap, Imlib_Image im, int use_filelist,
void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
int filled, int desktop, int use_filelist)
{
+ XGCValues gcvalues;
+ XGCValues gcval;
+ GC gc;
char bgname[20];
int num = (int) rand();
char bgfil[4096];
@@ -264,8 +267,6 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
Display *disp2;
Window root2;
int depth2;
- XGCValues gcvalues;
- GC gc;
int in, out, w, h;
if (opt.xinerama)
@@ -322,8 +323,6 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
0, 0, scr->width, scr->height);
fehbg = estrjoin(" ", "feh", fehbg_xinerama, "--bg-scale", filbuf, NULL);
} else if (centered) {
- XGCValues gcval;
- GC gc;
D(("centering\n"));
@@ -368,14 +367,12 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled,
fehbg = estrjoin(" ", "feh", fehbg_xinerama, "--bg-fill", filbuf, NULL);
} else if (filled == 2) {
- XGCValues gcval;
pmap_d1 = XCreatePixmap(disp, root, scr->width, scr->height, depth);
if (opt.image_bg == IMAGE_BG_WHITE)
gcval.foreground = WhitePixel(disp, DefaultScreen(disp));
else
gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
- gcval.foreground = BlackPixel(disp, DefaultScreen(disp));
gc = XCreateGC(disp, root, GCForeground, &gcval);
XFillRectangle(disp, pmap_d1, gc, 0, 0, scr->width, scr->height);