summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--composite/compinit.c3
-rw-r--r--composite/compwindow.c8
-rw-r--r--dix/window.c43
-rw-r--r--include/window.h4
5 files changed, 66 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 49ec94cd5..02c31ce2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-3-29 Deron Johnson <deron.johnson@sun.com>
+
+ * xorg/composite/compinit.c
+ * xorg/composite/compwindow.c
+ * xorg/dix/window.c
+ * xorg/include/window.h
+ Fix composite overlay window bug 6411.
+
2006-03-28 Adam Jackson <ajax@freedesktop.org>
* afb/afbbitblt.c:
diff --git a/composite/compinit.c b/composite/compinit.c
index e74e38248..5a1361216 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -88,6 +88,7 @@ compCloseScreen (int index, ScreenPtr pScreen)
xfree (cs);
pScreen->devPrivates[CompScreenPrivateIndex].ptr = 0;
ret = (*pScreen->CloseScreen) (index, pScreen);
+
return ret;
}
@@ -419,5 +420,7 @@ compScreenInit (ScreenPtr pScreen)
pScreen->devPrivates[CompScreenPrivateIndex].ptr = (pointer) cs;
+ RegisterRealChildHeadProc(CompositeRealChildHead);
+
return TRUE;
}
diff --git a/composite/compwindow.c b/composite/compwindow.c
index 1f8409698..87055b70c 100644
--- a/composite/compwindow.c
+++ b/composite/compwindow.c
@@ -144,11 +144,19 @@ Bool
compCheckRedirect (WindowPtr pWin)
{
CompWindowPtr cw = GetCompWindow (pWin);
+ CompScreenPtr cs = GetCompScreen(pWin->drawable.pScreen);
Bool should;
should = pWin->realized && (pWin->drawable.class != InputOnly) &&
(cw != NULL);
+ /* Never redirect the overlay window */
+ if (cs->pOverlayWin != NULL) {
+ if (pWin == cs->pOverlayWin) {
+ should = FALSE;
+ }
+ }
+
if (should != pWin->redirectDraw)
{
if (should)
diff --git a/dix/window.c b/dix/window.c
index 2e0d6de4b..0747d8668 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -2,6 +2,28 @@
/* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */
/*
+Copyright (c) 2004, Sun Microsystems, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+SUN MICROSYSTEMS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Sun Microsystems shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from Sun Microsystems.
+
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
@@ -512,6 +534,7 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
register int x, register int y,
register int w, register int h)
{
+ ScreenPtr pScreen = pWin->drawable.pScreen;
BoxRec box;
box = *(REGION_EXTENTS(pScreen, &pWin->winSize));
@@ -534,9 +557,22 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn,
REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize);
}
+static RealChildHeadProc realChildHeadProc = NULL;
+
+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)))
@@ -1610,6 +1646,8 @@ CreateUnclippedWinSize (register WindowPtr pWin)
pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
@@ -1644,6 +1682,8 @@ SetWinSize (register WindowPtr pWin)
(int)pWin->drawable.height);
#ifdef SHAPE
if (wBoundingShape (pWin) || wClipShape (pWin)) {
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x,
- pWin->drawable.y);
if (wBoundingShape (pWin))
@@ -1684,6 +1724,8 @@ SetBorderSize (register WindowPtr pWin)
(int)(pWin->drawable.height + (bw<<1)));
#ifdef SHAPE
if (wBoundingShape (pWin)) {
+ ScreenPtr pScreen = pWin->drawable.pScreen;
+
REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x,
- pWin->drawable.y);
REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize,
@@ -1893,6 +1935,7 @@ MakeBoundingRegion (
BoxPtr pBox)
{
RegionPtr pRgn;
+ ScreenPtr pScreen = pWin->drawable.pScreen;
pRgn = REGION_CREATE(pScreen, pBox, 1);
if (wBoundingShape (pWin)) {
diff --git a/include/window.h b/include/window.h
index 32559272d..0aeca6ef4 100644
--- a/include/window.h
+++ b/include/window.h
@@ -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*/);