summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c56
1 files changed, 48 insertions, 8 deletions
diff --git a/dix/window.c b/dix/window.c
index 36289db5b..6660bfbd6 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xc/programs/Xserver/dix/window.c,v 1.1.4.4.2.3 2004/03/08 00:36:56 alanc Exp $ */
+/* $XdotOrg: xc/programs/Xserver/dix/window.c,v 1.6 2004/07/31 08:24:13 anholt Exp $ */
/* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */
/*
@@ -291,6 +291,9 @@ SetWindowToDefaults(register WindowPtr pWin)
pWin->srcBuffer = DBE_FRONT_BUFFER;
pWin->dstBuffer = DBE_FRONT_BUFFER;
#endif
+#ifdef COMPOSITE
+ pWin->redirectDraw = 0;
+#endif
}
static void
@@ -1661,6 +1664,19 @@ void
SetWinSize (pWin)
register WindowPtr pWin;
{
+#ifdef COMPOSITE
+ if (pWin->redirectDraw)
+ {
+ BoxRec box;
+
+ box.x1 = pWin->drawable.x;
+ box.y1 = pWin->drawable.y;
+ box.x2 = pWin->drawable.x + pWin->drawable.width;
+ box.y2 = pWin->drawable.y + pWin->drawable.height;
+ REGION_RESET (pScreen, &pWin->winSize, &box);
+ }
+ else
+#endif
ClippedRegionFromBox(pWin->parent, &pWin->winSize,
pWin->drawable.x, pWin->drawable.y,
(int)pWin->drawable.width,
@@ -1691,6 +1707,19 @@ SetBorderSize (pWin)
if (HasBorder (pWin)) {
bw = wBorderWidth (pWin);
+#ifdef COMPOSITE
+ if (pWin->redirectDraw)
+ {
+ BoxRec box;
+
+ box.x1 = pWin->drawable.x - bw;
+ box.y1 = pWin->drawable.y - bw;
+ box.x2 = pWin->drawable.x + pWin->drawable.width + bw;
+ box.y2 = pWin->drawable.y + pWin->drawable.height + bw;
+ REGION_RESET (pScreen, &pWin->borderSize, &box);
+ }
+ else
+#endif
ClippedRegionFromBox(pWin->parent, &pWin->borderSize,
pWin->drawable.x - bw, pWin->drawable.y - bw,
(int)(pWin->drawable.width + (bw<<1)),
@@ -3152,10 +3181,17 @@ HandleSaveSet(client)
for (j=0; j<client->numSaved; j++)
{
- pWin = (WindowPtr)client->saveSet[j];
- pParent = pWin->parent;
- while (pParent && (wClient (pParent) == client))
- pParent = pParent->parent;
+ pWin = SaveSetWindow(client->saveSet[j]);
+#ifdef XFIXES
+ if (SaveSetToRoot(client->saveSet[j]))
+ pParent = WindowTable[pWin->drawable.pScreen->myNum];
+ else
+#endif
+ {
+ pParent = pWin->parent;
+ while (pParent && (wClient (pParent) == client))
+ pParent = pParent->parent;
+ }
if (pParent)
{
if (pParent != pWin->parent)
@@ -3167,12 +3203,15 @@ HandleSaveSet(client)
if(!pWin->realized && pWin->mapped)
pWin->mapped = FALSE;
}
- MapWindow(pWin, client);
+#ifdef XFIXES
+ if (SaveSetRemap (client->saveSet[j]))
+#endif
+ MapWindow(pWin, client);
}
}
xfree(client->saveSet);
client->numSaved = 0;
- client->saveSet = (pointer *)NULL;
+ client->saveSet = (SaveSetElt *)NULL;
}
Bool
@@ -3227,8 +3266,9 @@ SendVisibilityNotify(pWin)
WindowPtr pWin;
{
xEvent event;
+#ifndef NO_XINERAMA_PORT
unsigned int visibility = pWin->visibility;
-
+#endif
#ifdef PANORAMIX
/* This is not quite correct yet, but it's close */
if(!noPanoramiXExtension) {