Re: panorama for dual head displays: howto?

[email protected] Thu, 3 Nov 2005 14:07:48 -0500
Newsgroups gmane.compw.window-managers.windowmaker.user
Message-ID <20051103140748.126fee62@amorphous>

On Thu, 03 Nov 2005 11:00:21 -0600
Paul Johnson <[email protected]> wrote:

> Can somebody tell me where the WM source code for wmsetbg controls how 
> backgrounds are shown on dual head displays?  I have an Nvidia dual 
> video card and have been happy that WM shows the same image on both 
> monitors.  That's different from Gnome's Nautilus/Metacity, which 
> stretches one background across the two monitors. Nvidia does not use 
> Xinerama. Rather, it has something they call Twinview which makes the 
> dual head appear as one big 2056x1024 monitor.  But the WM backgrounds 
> don't cooperate--the 2 monitors are still backgrounded separately.  But 
> I can drag windows across the heads and the Gnome workspace pager thing 
> does show the double wide monitors as single workspaces.

actually the nvidia Twinview driver will reply to a xinerama query correctly
if Xinerama is enabled in X as mentioned in the nvidia README
twinview will work as you mentioned only when xinerama isn't enabled
to disable wmsetbg's knowledge of Xinerama 

attached you'll find a patch which i believe works for disabling wmsetbgs default
behavior when xinerama is enabled

Enjoy 
> 
> Lately I've found some wide images and want to re-configure WM to 
> stretch across dual monitors.  I feel sure this is possible because 
> there was a brief time when WM did stretch the background across the 
> dual displays.  It was about 2 years ago, I think.  I've been looking 
> through the WM source code, but I can't find the right part.
> 
> 
> -- 
> Paul E. Johnson                       email: [email protected]
> Dept. of Political Science            http://lark.cc.ku.edu/~pauljohn
> 1541 Lilac Lane, Rm 504
> University of Kansas                  Office: (785) 864-9086
> Lawrence, Kansas 66044-3177           FAX: (785) 864-5700
> _______________________________________________
> INFO: https://windowmaker.org/lists/listinfo/wm-user
> ARCHIVE: https://windowmaker.org/lists/archive/wm-user/
> FAQ: http://windowmaker.org/faq.html

_______________________________________________
INFO: https://windowmaker.org/lists/listinfo/wm-user
ARCHIVE: https://windowmaker.org/lists/archive/wm-user/
FAQ: http://windowmaker.org/faq.html
wmsetbg_xinerama.diff (text/x-patch, 1.8 KB)
--- wm-anon/util/wmsetbg.c	2005-11-03 14:05:04.000000000 -0500
+++ wmsetbg.c	2005-11-03 14:04:12.000000000 -0500
@@ -61,6 +61,7 @@
 typedef struct {
     WMRect *screens;
     int count;                 /* screen count, 0 = inactive */
+    Bool ignoreXinerama;
 } WXineramaInfo;
 
 
@@ -566,7 +567,7 @@
                 texture->height = scrHeight;
 
 #ifdef XINERAMA
-                if (xineInfo.count) {
+                if (xineInfo.count && !xineInfo.ignoreXinerama) {
                     int i;
                     for (i=0; i<xineInfo.count; ++i) {
                         applyImage(rc, texture, image, type[0],
@@ -1294,6 +1295,9 @@
     P(" -c, --colors <cpc>		colors per channel to use");
     P(" -p, --parse <texture>		proplist style texture specification");
     P(" -w, --workspace <workspace>	update background for the specified workspace");
+#ifdef XINERAMA
+    P(" -i, --ignoreXinerama       ignore Xinerama head configuration");
+#endif
     P("     --version 			show version of wmsetbg and exit");
     P("     --help 			show this help and exit");
 #undef P
@@ -1354,6 +1358,7 @@
     int update=0, cpc=4, render_mode=RDitheredRendering, obey_user=0;
     char *texture = NULL;
     int workspace = -1;
+    xineInfo.ignoreXinerama = False;
 
     signal(SIGINT, SIG_DFL);
     signal(SIGTERM, SIG_DFL);
@@ -1401,7 +1406,14 @@
         } else if (strcmp(argv[i], "-S")==0
                    || strcmp(argv[i], "--smooth")==0) {
             smooth = True;
-        } else if (strcmp(argv[i], "-u")==0
+        } 
+#ifdef XINERAMA
+	else if (strcmp(argv[i], "-i")==0
+                   || strcmp(argv[i], "--ignoreXinerama")==0) {
+            xineInfo.ignoreXinerama = True;
+	}
+#endif
+	else if (strcmp(argv[i], "-u")==0
                    || strcmp(argv[i], "--update-wmaker")==0) {
             update++;
         } else if (strcmp(argv[i], "-D")==0