summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c159
1 files changed, 1 insertions, 158 deletions
diff --git a/dix/window.c b/dix/window.c
index 14fccab6e..9bcf546aa 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -179,9 +179,6 @@ static Bool TileScreenSaver(int i, int kind);
#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
-_X_EXPORT int numSaveUndersViewable = 0;
-_X_EXPORT int deltaSaveUndersViewable = 0;
-
#ifdef DEBUG
/******
* PrintWindowTree
@@ -269,8 +266,6 @@ int defaultBackingStore = NotUseful;
/* hack to force no backing store */
Bool disableBackingStore = FALSE;
Bool enableBackingStore = FALSE;
-/* hack to force no save unders */
-Bool disableSaveUnders = FALSE;
static void
SetWindowToDefaults(WindowPtr pWin)
@@ -470,20 +465,7 @@ CreateRootWindow(ScreenPtr pScreen)
if (enableBackingStore)
pScreen->backingStoreSupport = Always;
-#ifdef DO_SAVE_UNDERS
- if ((pScreen->backingStoreSupport != NotUseful) &&
- (pScreen->saveUnderSupport == NotUseful))
- {
- /*
- * If the screen has backing-store but no save-unders, let the
- * clients know we can support save-unders using backing-store.
- */
- pScreen->saveUnderSupport = USE_DIX_SAVE_UNDERS;
- }
-#endif /* DO_SAVE_UNDERS */
-
- if (disableSaveUnders)
- pScreen->saveUnderSupport = NotUseful;
+ pScreen->saveUnderSupport = NotUseful;
return TRUE;
}
@@ -927,10 +909,6 @@ CrushTree(WindowPtr pWin)
}
FreeResource(pChild->drawable.id, RT_WINDOW);
pSib = pChild->nextSib;
-#ifdef DO_SAVE_UNDERS
- if (pChild->saveUnder && pChild->viewable)
- deltaSaveUndersViewable--;
-#endif
pChild->viewable = FALSE;
if (pChild->realized)
{
@@ -1257,47 +1235,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
client->errorValue = val;
goto PatchUp;
}
-#ifdef DO_SAVE_UNDERS
- if (pWin->parent && (pWin->saveUnder != val) && (pWin->viewable) &&
- DO_SAVE_UNDERS(pWin))
- {
- /*
- * Re-check all siblings and inferiors for obscurity or
- * exposition (hee hee).
- */
- if (pWin->saveUnder)
- deltaSaveUndersViewable--;
- else
- deltaSaveUndersViewable++;
- pWin->saveUnder = val;
-
- if (pWin->firstChild)
- {
- pLayerWin = (*pScreen->GetLayerWindow)(pWin);
- if ((*pScreen->ChangeSaveUnder)(pLayerWin->parent, pWin->nextSib))
- (*pScreen->PostChangeSaveUnder)(pLayerWin->parent,
- pWin->nextSib);
- }
- else
- {
- if ((*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib))
- (*pScreen->PostChangeSaveUnder)(pWin,
- pWin->nextSib);
- }
- }
- else
- {
- /* If we're changing the saveUnder attribute of the root
- * window, all we do is set pWin->saveUnder so that
- * GetWindowAttributes returns the right value. We don't
- * do the "normal" save-under processing (as above).
- * Hope that doesn't cause any problems.
- */
- pWin->saveUnder = val;
- }
-#else
pWin->saveUnder = val;
-#endif /* DO_SAVE_UNDERS */
break;
case CWEventMask:
rc = EventSelectForWindow(pWin, client, (Mask )*pVlist);
@@ -2199,9 +2137,6 @@ ReflectStackChange(
Bool WasViewable = (Bool)pWin->viewable;
Bool anyMarked;
WindowPtr pFirstChange;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
ScreenPtr pScreen = pWin->drawable.pScreen;
@@ -2216,21 +2151,11 @@ ReflectStackChange(
anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
&pLayerWin);
if (pLayerWin != pWin) pFirstChange = pLayerWin;
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
{
(*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind);
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind);
}
@@ -2681,10 +2606,6 @@ RealizeTree(WindowPtr pWin)
if (pChild->mapped)
{
pChild->realized = TRUE;
-#ifdef DO_SAVE_UNDERS
- if (pChild->saveUnder)
- deltaSaveUndersViewable++;
-#endif
pChild->viewable = (pChild->drawable.class == InputOutput);
(* Realize)(pChild);
if (pChild->firstChild)
@@ -2739,9 +2660,6 @@ MapWindow(WindowPtr pWin, ClientPtr client)
ScreenPtr pScreen;
WindowPtr pParent;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
if (pWin->mapped)
@@ -2787,21 +2705,11 @@ MapWindow(WindowPtr pWin, ClientPtr client)
{
anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin,
&pLayerWin);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
{
(*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
}
@@ -2841,17 +2749,11 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
{
WindowPtr pWin;
WindowPtr pFirstMapped = NullWindow;
-#ifdef DO_SAVE_UNDERS
- WindowPtr pFirstSaveUndered = NullWindow;
-#endif
ScreenPtr pScreen;
Mask parentRedirect;
Mask parentNotify;
xEvent event;
Bool anyMarked;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
pScreen = pParent->drawable.pScreen;
@@ -2891,12 +2793,6 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
{
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
(WindowPtr *)NULL);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = TRUE;
- }
-#endif /* DO_SAVE_UNDERS */
}
}
}
@@ -2913,38 +2809,9 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
}
if (anyMarked)
{
-#ifdef DO_SAVE_UNDERS
- if (pLayerWin->parent != pParent)
- {
- if (dosave || (DO_SAVE_UNDERS(pLayerWin)))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin,
- pLayerWin);
- }
- }
- else if (dosave)
- {
- dosave = FALSE;
- for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib)
- {
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave |= (*pScreen->ChangeSaveUnder)(pWin,
- pWin->nextSib);
- if (dosave && !pFirstSaveUndered)
- pFirstSaveUndered = pWin;
- }
- }
- }
-#endif /* DO_SAVE_UNDERS */
(*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap);
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin,
- pFirstSaveUndered->nextSib);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped,
VTMap);
@@ -2984,10 +2851,6 @@ UnrealizeTree(
DeleteWindowFromAnyEvents(pChild, FALSE);
if (pChild->viewable)
{
-#ifdef DO_SAVE_UNDERS
- if (pChild->saveUnder)
- deltaSaveUndersViewable--;
-#endif
pChild->viewable = FALSE;
(* MarkUnrealizedWindow)(pChild, pWin, fromConfigure);
pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -3048,16 +2911,6 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
(*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap);
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib) )
- {
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
- }
- }
- pWin->DIXsaveUnder = FALSE;
-#endif /* DO_SAVE_UNDERS */
if (!fromConfigure && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap);
}
@@ -3113,9 +2966,6 @@ UnmapSubwindows(WindowPtr pWin)
UnrealizeTree(pChild, FALSE);
if (wasViewable)
{
-#ifdef DO_SAVE_UNDERS
- pChild->DIXsaveUnder = FALSE;
-#endif /* DO_SAVE_UNDERS */
}
}
}
@@ -3145,13 +2995,6 @@ UnmapSubwindows(WindowPtr pWin)
(*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap);
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin))
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap);
}