mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 04:48:06 +01:00
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.
This commit is contained in:
committed by
Carlos R. Mafra
parent
567279b962
commit
5c46f48898
@@ -80,6 +80,9 @@ int scrX, scrY;
|
|||||||
WXineramaInfo xineInfo;
|
WXineramaInfo xineInfo;
|
||||||
|
|
||||||
Bool smooth = False;
|
Bool smooth = False;
|
||||||
|
#ifdef XINERAMA
|
||||||
|
Bool xineStretch = False;
|
||||||
|
#endif
|
||||||
|
|
||||||
Pixmap CurrentPixmap = None;
|
Pixmap CurrentPixmap = None;
|
||||||
char *PixmapPath = NULL;
|
char *PixmapPath = NULL;
|
||||||
@@ -543,7 +546,7 @@ BackgroundTexture *parseTexture(RContext * rc, char *text)
|
|||||||
texture->height = scrHeight;
|
texture->height = scrHeight;
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
if (xineInfo.count) {
|
if (xineInfo.count && ! xineStretch) {
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < xineInfo.count; ++i) {
|
for (i = 0; i < xineInfo.count; ++i) {
|
||||||
applyImage(rc, texture, image, type[0],
|
applyImage(rc, texture, image, type[0],
|
||||||
@@ -1214,6 +1217,9 @@ void print_help(char *ProgName)
|
|||||||
P(" -d, --dither dither image");
|
P(" -d, --dither dither image");
|
||||||
P(" -m, --match match colors");
|
P(" -m, --match match colors");
|
||||||
P(" -S, --smooth smooth scaled image");
|
P(" -S, --smooth smooth scaled image");
|
||||||
|
#ifdef XINERAMA
|
||||||
|
P(" -X, --xinerama stretch image across Xinerama heads");
|
||||||
|
#endif
|
||||||
P(" -b, --back-color <color> background color");
|
P(" -b, --back-color <color> background color");
|
||||||
P(" -t, --tile tile image");
|
P(" -t, --tile tile image");
|
||||||
P(" -e, --center center image");
|
P(" -e, --center center image");
|
||||||
@@ -1319,6 +1325,10 @@ int main(int argc, char **argv)
|
|||||||
obey_user++;
|
obey_user++;
|
||||||
} else if (strcmp(argv[i], "-S") == 0 || strcmp(argv[i], "--smooth") == 0) {
|
} else if (strcmp(argv[i], "-S") == 0 || strcmp(argv[i], "--smooth") == 0) {
|
||||||
smooth = True;
|
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) {
|
} else if (strcmp(argv[i], "-u") == 0 || strcmp(argv[i], "--update-wmaker") == 0) {
|
||||||
update++;
|
update++;
|
||||||
} else if (strcmp(argv[i], "-D") == 0 || strcmp(argv[i], "--update-domain") == 0) {
|
} else if (strcmp(argv[i], "-D") == 0 || strcmp(argv[i], "--update-domain") == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user