No idea why my last post buggered, so here's what I meant to send (attached is his actual patch):

   Hi!
   I made a little patch I'd like to see integrated (if appropriate)
   which makes Compiz usable in desktop+TV-out setups. It adds the
   --only-current-screen option to compiz which tell it to only manage
   the screen defined by $DISPLAY and leave the others alone.

   With this patch I can finally use Compiz on my desktop monitor
   (DISPLAY=:0.0) while TV-out (DISPLAY=:0.1) is independently running
   fullscreen apps like MPlayer/MAME/ZSnes/MythTV/etc...

   Regards,
   Per Wigren aka Tuxie, [EMAIL PROTECTED]

diff -ur compiz-0.3.6.orig/include/compiz.h compiz-0.3.6/include/compiz.h
--- compiz-0.3.6.orig/include/compiz.h	2006-12-27 19:28:22.000000000 +0100
+++ compiz-0.3.6/include/compiz.h	2007-03-04 16:08:27.000000000 +0100
@@ -210,6 +210,7 @@
 extern Bool       strictBinding;
 extern Bool       useCow;
 extern Bool       noDetection;
+extern Bool       onlyCurrentScreen;
 
 extern int  defaultRefreshRate;
 extern char *defaultTextureFilter;
diff -ur compiz-0.3.6.orig/src/display.c compiz-0.3.6/src/display.c
--- compiz-0.3.6.orig/src/display.c	2006-12-25 05:38:12.000000000 +0100
+++ compiz-0.3.6/src/display.c	2007-03-04 16:16:25.000000000 +0100
@@ -2461,6 +2461,7 @@
     int		revertTo, i;
     int		compositeMajor, compositeMinor;
     int		xkbOpcode;
+    int		firstScreen, lastScreen;
 
     d = &compDisplay;
 
@@ -2778,7 +2779,15 @@
     d->escapeKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Escape"));
     d->returnKeyCode = XKeysymToKeycode (dpy, XStringToKeysym ("Return"));
 
-    for (i = 0; i < ScreenCount (dpy); i++)
+    if( onlyCurrentScreen ) {
+        firstScreen = DefaultScreen (dpy);
+        lastScreen  = DefaultScreen (dpy);
+    } else {
+        firstScreen = 0;
+        lastScreen  = ScreenCount (dpy) - 1;
+    }
+
+    for(i = firstScreen ; i <= lastScreen ; i++)
     {
 	Window		     newWmSnOwner = None, newCmSnOwner = None;
 	Atom		     wmSnAtom = 0, cmSnAtom = 0;
diff -ur compiz-0.3.6.orig/src/main.c compiz-0.3.6/src/main.c
--- compiz-0.3.6.orig/src/main.c	2006-12-29 03:56:41.000000000 +0100
+++ compiz-0.3.6/src/main.c	2007-03-04 15:55:36.000000000 +0100
@@ -81,6 +81,7 @@
 Bool indirectRendering = FALSE;
 Bool strictBinding = TRUE;
 Bool noDetection = FALSE;
+Bool onlyCurrentScreen = FALSE;
 
 #ifdef USE_COW
 Bool useCow = TRUE;
@@ -101,6 +102,7 @@
 	    "[--sm-client-id ID] "
 	    "[--no-detection] "
 	    "[--version]\n       "
+	    "[--only-current-screen] "
 
 #ifdef USE_COW
 	    "[--use-root-window] "
@@ -196,6 +198,10 @@
 	{
 	    strictBinding = FALSE;
 	}
+	else if (!strcmp (argv[i], "--only-current-screen"))
+	{
+	    onlyCurrentScreen = TRUE;
+	}
 
 #ifdef USE_COW
 	else if (!strcmp (argv[i], "--use-root-window"))
_______________________________________________
compiz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/compiz

Reply via email to