summaryrefslogtreecommitdiff
path: root/src/support.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/support.c')
-rw-r--r--src/support.c10
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;