Bug 6411

Summary: dix/windows.c:RealChildHead is missing an important modification for Composite Overlay Window
Product: xorg Reporter: Deron Johnson <deron.johnson>
Component: Server/GeneralAssignee: Deron Johnson <deron.johnson>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: soren.sandmann
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 5041    

Description Deron Johnson 2006-03-28 07:55:34 UTC
Soeren Sandmann <sandmann@daimi.au.dk> writes:


>> few problems with the current implementation as the attached prgoram


It looks like, you might have forgotten to commit the dix level
support for the composite overlay windows. This patch makes it work
for me.


Soren




Index: composite/compwindow.c
===================================================================
RCS file: /cvs/xorg/xserver/xorg/composite/compwindow.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 compwindow.c
--- composite/compwindow.c	13 Mar 2006 21:59:55 -0000	1.12
+++ composite/compwindow.c	24 Mar 2006 20:13:21 -0000
@@ -600,6 +602,7 @@ compCreateWindow (WindowPtr pWin)
     cs->CreateWindow = pScreen->CreateWindow;
     pScreen->CreateWindow = compCreateWindow;
     compCheckTree (pWin->drawable.pScreen);
+    RegisterRealChildHeadProc (CompositeRealChildHead);
     return ret;
 }
 
Index: dix/window.c
===================================================================
RCS file: /cvs/xorg/xserver/xorg/dix/window.c,v
retrieving revision 1.14
diff -u -p -u -r1.14 window.c
--- dix/window.c	15 Feb 2006 20:44:12 -0000	1.14
+++ dix/window.c	24 Mar 2006 20:13:21 -0000
@@ -535,9 +535,24 @@ ClippedRegionFromBox(register WindowPtr 
     REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize);
 }
 
+#ifdef COMPOSITE
+#include "compint.h"
+#endif
+
+static RealChildHeadProc realChildHeadProc;
+
+void
+RegisterRealChildHeadProc (RealChildHeadProc proc)
+{
+    realChildHeadProc = proc;
+}
+
 WindowPtr
 RealChildHead(register WindowPtr pWin)
 {
+    if (realChildHeadProc)
+	return realChildHeadProc (pWin);
+    
     if (!pWin->parent &&
 	(screenIsSaved == SCREEN_SAVER_ON) &&
 	(HasSaverWindow (pWin->drawable.pScreen->myNum)))
Index: include/window.h
===================================================================
RCS file: /cvs/xorg/xserver/xorg/include/window.h,v
retrieving revision 1.10
diff -u -p -u -r1.10 window.h
--- include/window.h	12 Jan 2006 22:14:56 -0000	1.10
+++ include/window.h	24 Mar 2006 20:13:21 -0000
@@ -102,6 +102,10 @@ extern void ClippedRegionFromBox(
     int /*w*/,
     int /*h*/);
 
+typedef WindowPtr (* RealChildHeadProc) (WindowPtr pWin);
+
+void RegisterRealChildHeadProc (RealChildHeadProc proc);
+
 extern WindowPtr RealChildHead(
     WindowPtr /*pWin*/);
Comment 1 Søren Sandmann Pedersen 2006-03-29 00:59:44 UTC
Also, we need code to make sure the overlay windows don't show up in replies to
QueryTree.
Comment 2 Deron Johnson 2006-03-29 11:45:26 UTC
Soeren: as far as I can tell the suggested fix you posted to window.c does
ensure that the overlay window doesn't show up in the QueryTree results. I've
tested the code to verify this.
Comment 3 Deron Johnson 2006-03-30 03:54:40 UTC
Hi Soeren,

I've believe I have fixed this bug now. Please retest and let me know if
you continue to experience problems. Thanks for your thorough testing!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.