From ef23aac7ed58a4289d1c8324404ec0481890778f Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 15 Aug 2011 10:27:26 +0200 Subject: Fix some compiler warnings --- src/support.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/support.c') 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; -- cgit v1.2.3