From 5c46f48898e7307ef28cc8d65294809877893585 Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Mon, 14 Sep 2009 14:13:58 +0100 Subject: [PATCH] Support Xinerama in wmsetbg. Allow wmsetbg to revert to pre-0.90.0 behaviour when choosing a background image that is large enough to span several heads in a Xinerama setup. If the -X flag is passed to wmsetbg, the background image will be stretched to fill the logical screen (as it would be by default in older versions of wmsetbg) instead of being tiled across screens. --- util/wmsetbg.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/util/wmsetbg.c b/util/wmsetbg.c index d5328bca..96e14b54 100644 --- a/util/wmsetbg.c +++ b/util/wmsetbg.c @@ -80,6 +80,9 @@ int scrX, scrY; WXineramaInfo xineInfo; Bool smooth = False; +#ifdef XINERAMA +Bool xineStretch = False; +#endif Pixmap CurrentPixmap = None; char *PixmapPath = NULL; @@ -543,7 +546,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text) texture->height = scrHeight; #ifdef XINERAMA - if (xineInfo.count) { + if (xineInfo.count && ! xineStretch) { int i; for (i = 0; i < xineInfo.count; ++i) { applyImage(rc, texture, image, type[0], @@ -1214,6 +1217,9 @@ void print_help(char *ProgName) P(" -d, --dither dither image"); P(" -m, --match match colors"); P(" -S, --smooth smooth scaled image"); +#ifdef XINERAMA + P(" -X, --xinerama stretch image across Xinerama heads"); +#endif P(" -b, --back-color background color"); P(" -t, --tile tile image"); P(" -e, --center center image"); @@ -1319,6 +1325,10 @@ int main(int argc, char **argv) obey_user++; } else if (strcmp(argv[i], "-S") == 0 || strcmp(argv[i], "--smooth") == 0) { smooth = True; +#ifdef XINERAMA + } else if (strcmp(argv[i], "-X") == 0 || strcmp(argv[i], "--xinerama") == 0) { + xineStretch = True; +#endif } else if (strcmp(argv[i], "-u") == 0 || strcmp(argv[i], "--update-wmaker") == 0) { update++; } else if (strcmp(argv[i], "-D") == 0 || strcmp(argv[i], "--update-domain") == 0) { -- 2.11.4.GIT