summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xext/panoramiX.c12
-rw-r--r--dix/main.c2
-rw-r--r--dix/window.c159
-rw-r--r--hw/kdrive/src/kdrive.c13
-rw-r--r--hw/xfree86/common/xf86Helper.c13
-rw-r--r--hw/xfree86/loader/dixsym.c2
-rw-r--r--hw/xquartz/darwin.c13
-rw-r--r--include/opaque.h1
-rw-r--r--include/windowstr.h19
-rw-r--r--mi/mi.h10
-rw-r--r--mi/mioverlay.c44
-rw-r--r--mi/miscrinit.c4
-rw-r--r--mi/miwindow.c257
-rw-r--r--os/utils.c3
14 files changed, 7 insertions, 545 deletions
diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c
index b690593ed..17f587b1e 100644
--- a/Xext/panoramiX.c
+++ b/Xext/panoramiX.c
@@ -588,7 +588,6 @@ Bool PanoramiXCreateConnectionBlock(void)
{
int i, j, length;
Bool disableBackingStore = FALSE;
- Bool disableSaveUnders = FALSE;
int old_width, old_height;
float width_mult, height_mult;
xWindowRoot *root;
@@ -614,17 +613,12 @@ Bool PanoramiXCreateConnectionBlock(void)
}
if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
disableBackingStore = TRUE;
- if(pScreen->saveUnderSupport != screenInfo.screens[0]->saveUnderSupport)
- disableSaveUnders = TRUE;
}
- if(disableBackingStore || disableSaveUnders) {
- for(i = 0; i < screenInfo.numScreens; i++) {
+ if (disableBackingStore) {
+ for (i = 0; i < screenInfo.numScreens; i++) {
pScreen = screenInfo.screens[i];
- if(disableBackingStore)
- pScreen->backingStoreSupport = NotUseful;
- if(disableSaveUnders)
- pScreen->saveUnderSupport = NotUseful;
+ pScreen->backingStoreSupport = NotUseful;
}
}
diff --git a/dix/main.c b/dix/main.c
index 35e59bd46..ac8e0f2e7 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -557,7 +557,7 @@ CreateConnectionBlock(void)
root.maxInstalledMaps = pScreen->maxInstalledCmaps;
root.rootVisualID = pScreen->rootVisual;
root.backingStore = pScreen->backingStoreSupport;
- root.saveUnders = pScreen->saveUnderSupport != NotUseful;
+ root.saveUnders = FALSE;
root.rootDepth = pScreen->rootDepth;
root.nDepths = pScreen->numDepths;
memmove(pBuf, (char *)&root, sizeof(xWindowRoot));
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);
}
diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c
index 754b94291..9e27840b7 100644
--- a/hw/kdrive/src/kdrive.c
+++ b/hw/kdrive/src/kdrive.c
@@ -102,9 +102,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
Bool WasViewable;
Bool anyMarked = FALSE;
RegionPtr pOldClip = 0;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
BoxRec box;
@@ -171,12 +168,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
anyMarked = TRUE;
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -186,10 +177,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
{
if (anyMarked)
(*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
}
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 0dd7fc7df..f10fb1ce8 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1096,9 +1096,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
WindowPtr pChild;
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = FALSE;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
BoxRec box;
@@ -1168,12 +1165,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
anyMarked = TRUE;
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1183,10 +1174,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
{
if (anyMarked)
(*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
}
diff --git a/hw/xfree86/loader/dixsym.c b/hw/xfree86/loader/dixsym.c
index 220d25c37..e9de050f9 100644
--- a/hw/xfree86/loader/dixsym.c
+++ b/hw/xfree86/loader/dixsym.c
@@ -323,8 +323,6 @@ _X_HIDDEN void *dixLookupTab[] = {
SYMFUNC(TraverseTree)
SYMFUNC(UnmapWindow)
SYMFUNC(WalkTree)
- SYMVAR(deltaSaveUndersViewable)
- SYMVAR(numSaveUndersViewable)
SYMVAR(savedScreenInfo)
SYMVAR(screenIsSaved)
diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c
index 3df1e7b57..50dcbbff6 100644
--- a/hw/xquartz/darwin.c
+++ b/hw/xquartz/darwin.c
@@ -900,9 +900,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
Bool WasViewable = (Bool)(pWin->viewable);
Bool anyMarked = TRUE;
RegionPtr pOldClip = NULL, bsExposed;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
BoxRec box;
@@ -973,12 +970,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
anyMarked = TRUE;
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1010,10 +1001,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
{
if (anyMarked)
(*pScreen->HandleExposures)(pWin);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
}
diff --git a/include/opaque.h b/include/opaque.h
index d5abcbd50..ab39cc8d0 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -54,7 +54,6 @@ extern char *display;
extern int defaultBackingStore;
extern Bool disableBackingStore;
extern Bool enableBackingStore;
-extern Bool disableSaveUnders;
extern Bool PartialNetwork;
#ifndef NOLOGOHACK
extern int logoScreenSaver;
diff --git a/include/windowstr.h b/include/windowstr.h
index 76501c726..13ce60bdd 100644
--- a/include/windowstr.h
+++ b/include/windowstr.h
@@ -257,25 +257,6 @@ typedef struct _FocusSemaphores {
char focusinout[(MAX_DEVICES + 7)/8];
} FocusSemaphoresRec, *FocusSemaphoresPtr;
-/*
- * this is the configuration parameter "NO_BACK_SAVE"
- * it means that any existant backing store should not
- * be used to implement save unders.
- */
-
-#ifndef NO_BACK_SAVE
-#define DO_SAVE_UNDERS(pWin) ((pWin)->drawable.pScreen->saveUnderSupport ==\
- USE_DIX_SAVE_UNDERS)
-/*
- * saveUnderSupport is set to this magic value when using DIXsaveUnders
- */
-
-#define USE_DIX_SAVE_UNDERS 0x40
-#endif
-
-extern int numSaveUndersViewable;
-extern int deltaSaveUndersViewable;
-
#ifdef XEVIE
extern WindowPtr xeviewin;
#endif
diff --git a/mi/mi.h b/mi/mi.h
index 2fdaf2047..45bfa1d2c 100644
--- a/mi/mi.h
+++ b/mi/mi.h
@@ -485,16 +485,6 @@ extern void miClearToBackground(
Bool /*generateExposures*/
);
-extern Bool miChangeSaveUnder(
- WindowPtr /*pWin*/,
- WindowPtr /*first*/
-);
-
-extern void miPostChangeSaveUnder(
- WindowPtr /*pWin*/,
- WindowPtr /*pFirst*/
-);
-
extern void miMarkWindow(
WindowPtr /*pWin*/
);
diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 77687fb0c..2fc583ed4 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -929,9 +929,6 @@ miOverlayMoveWindow(
short bw;
RegionRec overReg, underReg;
DDXPointRec oldpt;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
if (!(pParent = pWin->parent))
return ;
@@ -969,10 +966,6 @@ miOverlayMoveWindow(
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
(*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- dosave = (*pScreen->ChangeSaveUnder)(pWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
(*pScreen->ValidateTree)(pWin->parent, NullWindow, kind);
if(REGION_NOTEMPTY(pScreen, &underReg)) {
@@ -987,10 +980,6 @@ miOverlayMoveWindow(
REGION_UNINIT(pScreen, &overReg);
(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin->parent, NullWindow, kind);
}
@@ -1147,9 +1136,6 @@ miOverlayResizeWindow(
RegionPtr borderVisible2 = NullRegion;
Bool shrunk = FALSE; /* shrunk in an inner dimension */
Bool moved = FALSE; /* window position changed */
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
Bool doUnderlay;
/* if this is a root window, can't be resized */
@@ -1279,10 +1265,6 @@ miOverlayResizeWindow(
if(pTree)
pTree->valdata->borderVisible = borderVisible2;
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- dosave = (*pScreen->ChangeSaveUnder)(pWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
(*pScreen->ValidateTree)(pWin->parent, pFirstChange, VTOther);
/*
@@ -1504,10 +1486,6 @@ miOverlayResizeWindow(
if (destClip2)
REGION_DESTROY(pScreen, destClip2);
(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pWin, pFirstChange);
-#endif /* DO_SAVE_UNDERS */
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther);
}
@@ -1521,9 +1499,6 @@ miOverlaySetShape(WindowPtr pWin)
{
Bool WasViewable = (Bool)(pWin->viewable);
ScreenPtr pScreen = pWin->drawable.pScreen;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
if (WasViewable) {
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -1556,20 +1531,12 @@ miOverlaySetShape(WindowPtr pWin)
if (WasViewable) {
(*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin);
-#endif /* DO_SAVE_UNDERS */
(*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther);
}
if (WasViewable) {
(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pWin, pWin);
-#endif /* DO_SAVE_UNDERS */
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther);
}
@@ -1589,9 +1556,6 @@ miOverlayChangeBorderWidth(
ScreenPtr pScreen;
Bool WasViewable = (Bool)(pWin->viewable);
Bool HadBorder;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
oldwidth = wBorderWidth (pWin);
if (oldwidth == width)
@@ -1625,17 +1589,9 @@ miOverlayChangeBorderWidth(
}
}
}
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
(*pScreen->ValidateTree)(pWin->parent, pWin, VTOther);
(*pScreen->HandleExposures)(pWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pWin, pWin->nextSib);
-#endif /* DO_SAVE_UNDERS */
if (pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pWin->parent, pWin, VTOther);
}
diff --git a/mi/miscrinit.c b/mi/miscrinit.c
index ee607466f..6cd4df3a8 100644
--- a/mi/miscrinit.c
+++ b/mi/miscrinit.c
@@ -257,8 +257,8 @@ miScreenInit(
pScreen->wakeupData = (pointer)0;
pScreen->MarkWindow = miMarkWindow;
pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
- pScreen->ChangeSaveUnder = miChangeSaveUnder;
- pScreen->PostChangeSaveUnder = miPostChangeSaveUnder;
+ pScreen->ChangeSaveUnder = NULL;
+ pScreen->PostChangeSaveUnder = NULL;
pScreen->MoveWindow = miMoveWindow;
pScreen->ResizeWindow = miSlideAndSizeWindow;
pScreen->GetLayerWindow = miGetLayerWindow;
diff --git a/mi/miwindow.c b/mi/miwindow.c
index 1a8b19411..e3360d631 100644
--- a/mi/miwindow.c
+++ b/mi/miwindow.c
@@ -122,209 +122,6 @@ miClearToBackground(WindowPtr pWin,
REGION_DESTROY(pScreen, pBSReg);
}
-/*
- * For SaveUnders using backing-store. The idea is that when a window is mapped
- * with saveUnder set TRUE, any windows it obscures will have its backing
- * store turned on setting the DIXsaveUnder bit,
- * The backing-store code must be written to allow for this
- */
-
-/*-
- *-----------------------------------------------------------------------
- * miCheckSubSaveUnder --
- * Check all the inferiors of a window for coverage by saveUnder
- * windows. Called from ChangeSaveUnder and CheckSaveUnder.
- * This code is very inefficient.
- *
- * Results:
- * TRUE if any windows need to have backing-store removed.
- *
- * Side Effects:
- * Windows may have backing-store turned on or off.
- *
- *-----------------------------------------------------------------------
- */
-static Bool
-miCheckSubSaveUnder(
- WindowPtr pParent, /* Parent to check */
- WindowPtr pFirst, /* first reconfigured window */
- RegionPtr pRegion) /* Initial area obscured by saveUnder */
-{
- WindowPtr pChild; /* Current child */
- ScreenPtr pScreen; /* Screen to use */
- RegionRec SubRegion; /* Area of children obscured */
- Bool res = FALSE; /* result */
- Bool subInited=FALSE;/* SubRegion initialized */
-
- pScreen = pParent->drawable.pScreen;
- if ( (pChild = pParent->firstChild) )
- {
- /*
- * build region above first changed window
- */
-
- for (; pChild != pFirst; pChild = pChild->nextSib)
- if (pChild->viewable && pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
-
- /*
- * check region below and including first changed window
- */
-
- for (; pChild; pChild = pChild->nextSib)
- {
- if (pChild->viewable)
- {
- /*
- * don't save under nephew/niece windows;
- * use a separate region
- */
-
- if (pChild->firstChild)
- {
- if (!subInited)
- {
- REGION_NULL(pScreen, &SubRegion);
- subInited = TRUE;
- }
- REGION_COPY(pScreen, &SubRegion, pRegion);
- res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
- &SubRegion);
- }
- else
- {
- res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
- pRegion);
- }
-
- if (pChild->saveUnder)
- REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
- }
- }
-
- if (subInited)
- REGION_UNINIT(pScreen, &SubRegion);
- }
-
- /*
- * Check the state of this window. DIX save unders are
- * enabled for viewable windows with some client expressing
- * exposure interest and which intersect the save under region
- */
-
- if (pParent->viewable &&
- ((pParent->eventMask | wOtherEventMasks(pParent)) & ExposureMask) &&
- REGION_NOTEMPTY(pScreen, &pParent->borderSize) &&
- RECT_IN_REGION(pScreen, pRegion, REGION_EXTENTS(pScreen,
- &pParent->borderSize)) != rgnOUT)
- {
- if (!pParent->DIXsaveUnder)
- {
- pParent->DIXsaveUnder = TRUE;
- (*pScreen->ChangeWindowAttributes) (pParent, CWBackingStore);
- }
- }
- else
- {
- if (pParent->DIXsaveUnder)
- {
- res = TRUE;
- pParent->DIXsaveUnder = FALSE;
- }
- }
- return res;
-}
-
-
-/*-
- *-----------------------------------------------------------------------
- * miChangeSaveUnder --
- * Change the save-under state of a tree of windows. Called when
- * a window with saveUnder TRUE is mapped/unmapped/reconfigured.
- *
- * Results:
- * TRUE if any windows need to have backing-store removed (which
- * means that PostChangeSaveUnder needs to be called later to
- * finish the job).
- *
- * Side Effects:
- * Windows may have backing-store turned on or off.
- *
- *-----------------------------------------------------------------------
- */
-Bool
-miChangeSaveUnder(
- WindowPtr pWin,
- WindowPtr first /* First window to check.
- * Used when pWin was restacked */
- )
-{
- RegionRec rgn; /* Area obscured by saveUnder windows */
- ScreenPtr pScreen;
- Bool res;
-
- if (!deltaSaveUndersViewable && !numSaveUndersViewable)
- return FALSE;
- numSaveUndersViewable += deltaSaveUndersViewable;
- deltaSaveUndersViewable = 0;
- pScreen = pWin->drawable.pScreen;
- REGION_NULL(pScreen, &rgn);
- res = miCheckSubSaveUnder (pWin->parent,
- pWin->saveUnder ? first : pWin->nextSib,
- &rgn);
- REGION_UNINIT(pScreen, &rgn);
- return res;
-}
-
-/*-
- *-----------------------------------------------------------------------
- * miPostChangeSaveUnder --
- * Actually turn backing-store off for those windows that no longer
- * need to have it on.
- *
- * Results:
- * None.
- *
- * Side Effects:
- * Backing-store and SAVE_UNDER_CHANGE_BIT are turned off for those
- * windows affected.
- *
- *-----------------------------------------------------------------------
- */
-void
-miPostChangeSaveUnder(WindowPtr pWin, WindowPtr pFirst)
-{
- WindowPtr pParent, pChild;
- ChangeWindowAttributesProcPtr ChangeWindowAttributes;
-
- if (!(pParent = pWin->parent))
- return;
- ChangeWindowAttributes = pParent->drawable.pScreen->ChangeWindowAttributes;
- if (!pParent->DIXsaveUnder &&
- (pParent->backingStore == NotUseful) && pParent->backStorage)
- (*ChangeWindowAttributes)(pParent, CWBackingStore);
- if (!(pChild = pFirst))
- return;
- while (1)
- {
- if (!pChild->DIXsaveUnder &&
- (pChild->backingStore == NotUseful) && pChild->backStorage)
- (*ChangeWindowAttributes)(pChild, CWBackingStore);
- if (pChild->firstChild)
- {
- pChild = pChild->firstChild;
- continue;
- }
- while (!pChild->nextSib)
- {
- pChild = pChild->parent;
- if (pChild == pParent)
- return;
- }
- pChild = pChild->nextSib;
- }
-}
-
void
miMarkWindow(WindowPtr pWin)
{
@@ -474,9 +271,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
Bool anyMarked = FALSE;
ScreenPtr pScreen;
WindowPtr windowToValidate;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
/* if this is a root window, can't be moved */
@@ -516,12 +310,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
anyMarked |= (*pScreen->MarkOverlappedWindows)
(pWin, pLayerWin, (WindowPtr *)NULL);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, windowToValidate);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
{
@@ -531,10 +319,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
/* XXX need to retile border if ParentRelative origin */
(*pScreen->HandleExposures)(pLayerWin->parent);
}
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, windowToValidate);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, kind);
}
@@ -606,9 +390,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
RegionPtr borderVisible = NullRegion; /* visible area of the border */
Bool shrunk = FALSE; /* shrunk in an inner dimension */
Bool moved = FALSE; /* window position changed */
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
/* if this is a root window, can't be resized */
@@ -721,12 +502,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
pWin->valdata->before.borderVisible = borderVisible;
}
-#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, VTOther);
@@ -889,12 +664,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
REGION_DESTROY(pScreen, destClip);
if (anyMarked)
(*pScreen->HandleExposures)(pLayerWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- {
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange,
VTOther);
@@ -922,9 +691,6 @@ miSetShape(WindowPtr pWin)
Bool WasViewable = (Bool)(pWin->viewable);
ScreenPtr pScreen = pWin->drawable.pScreen;
Bool anyMarked = FALSE;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
if (WasViewable)
@@ -956,12 +722,6 @@ miSetShape(WindowPtr pWin)
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
(WindowPtr *)NULL);
-#ifdef DO_SAVE_UNDERS
- if (DO_SAVE_UNDERS(pWin))
- {
- dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
- }
-#endif /* DO_SAVE_UNDERS */
if (anyMarked)
(*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, VTOther);
@@ -971,10 +731,6 @@ miSetShape(WindowPtr pWin)
{
if (anyMarked)
(*pScreen->HandleExposures)(pLayerWin->parent);
-#ifdef DO_SAVE_UNDERS
- if (dosave)
- (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
-#endif /* DO_SAVE_UNDERS */
if (anyMarked && pScreen->PostValidateTree)
(*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, VTOther);
}
@@ -993,9 +749,6 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
ScreenPtr pScreen;
Bool WasViewable = (Bool)(pWin->viewable);
Bool HadBorder;
-#ifdef DO_SAVE_UNDERS
- Bool dosave = FALSE;
-#endif
WindowPtr pLayerWin;
oldwidth = wBorderWidth (pWin);
@@ -1028,22 +781,12 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
pWin->valdata->before.borderVisible = borderVisible;
}
}
-#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, VTOther);
(*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,
VTOther);
diff --git a/os/utils.c b/os/utils.c
index 96da35dd0..bf52ea01e 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -534,7 +534,6 @@ void UseMsg(void)
ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
#endif
ErrorF("-s # screen-saver timeout (minutes)\n");
- ErrorF("-su disable any save under support\n");
ErrorF("-t # mouse threshold (pixels)\n");
ErrorF("-terminate terminate at server reset\n");
ErrorF("-to # connection time out\n");
@@ -837,8 +836,6 @@ ProcessCommandLine(int argc, char *argv[])
else
UseMsg();
}
- else if ( strcmp( argv[i], "-su") == 0)
- disableSaveUnders = TRUE;
else if ( strcmp( argv[i], "-t") == 0)
{
if(++i < argc)