diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-08-15 10:27:26 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-08-15 10:27:26 +0200 |
commit | ef23aac7ed58a4289d1c8324404ec0481890778f (patch) | |
tree | c5b8122ec582eba7ab8c57d14ab79d1ddeb8148f /src/support.c | |
parent | 9ed3c2e20c8a216ede6d5bc8ed356758c17db773 (diff) |
Fix some compiler warnings
Diffstat (limited to 'src/support.c')
-rw-r--r-- | src/support.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/support.c b/src/support.c index e257271..7c3ab89 100644 --- a/src/support.c +++ b/src/support.c @@ -135,15 +135,13 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, unsigned long length, after; unsigned char *data_root, *data_esetroot; Pixmap pmap_d1, pmap_d2; + /* string for sticking in ~/.fehbg */ char *fehbg = NULL; char *home; char filbuf[PATH_MAX]; char fehbg_xinerama[] = "--no-xinerama"; - if (opt.xinerama) - fehbg_xinerama[0] = '\0'; - /* local display to set closedownmode on */ Display *disp2; Window root2; @@ -152,6 +150,9 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, GC gc; int in, out, w, h; + if (opt.xinerama) + fehbg_xinerama[0] = '\0'; + D(("Falling back to XSetRootWindowPixmap\n")); /* Put the filename in filbuf between ' and escape ' in the filename */ @@ -269,9 +270,10 @@ void feh_wm_set_bg(char *fil, Imlib_Image im, int centered, int scaled, int render_x = 0; int render_y = 0; int border_x = (((img_w * scr_h) > (img_h * scr_w)) ? 0 : 1); + XGCValues gcval; + w = (border_x ? ((scr_h * img_w) / img_h) : scr_w); h = (border_x ? scr_h : ((scr_w * img_h) / img_w)); - XGCValues gcval; if (border_x) render_x = (scr_w - w) >> 1; |