summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-08-13 17:28:08 -0400
committerAdam Jackson <ajax@redhat.com>2008-08-13 17:28:08 -0400
commit0ce687634fa5e0d955e896a0d0d5f584a4cfd1a4 (patch)
tree97473dd6b8d5526575ebf91f6d8323a2b4a79ba4
parentf456f32cd97684052cab4712e7f4c827132c554b (diff)
Eviscerate save-under support.
Use a compositing manager already. Plus I really wanted to use 'eviscerate' in a commit message.
-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)
588{ 588{
589 int i, j, length; 589 int i, j, length;
590 Bool disableBackingStore = FALSE; 590 Bool disableBackingStore = FALSE;
591 Bool disableSaveUnders = FALSE;
592 int old_width, old_height; 591 int old_width, old_height;
593 float width_mult, height_mult; 592 float width_mult, height_mult;
594 xWindowRoot *root; 593 xWindowRoot *root;
@@ -614,17 +613,12 @@ Bool PanoramiXCreateConnectionBlock(void)
614 } 613 }
615 if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport) 614 if(pScreen->backingStoreSupport != screenInfo.screens[0]->backingStoreSupport)
616 disableBackingStore = TRUE; 615 disableBackingStore = TRUE;
617 if(pScreen->saveUnderSupport != screenInfo.screens[0]->saveUnderSupport)
618 disableSaveUnders = TRUE;
619 } 616 }
620 617
621 if(disableBackingStore || disableSaveUnders) { 618 if (disableBackingStore) {
622 for(i = 0; i < screenInfo.numScreens; i++) { 619 for (i = 0; i < screenInfo.numScreens; i++) {
623 pScreen = screenInfo.screens[i]; 620 pScreen = screenInfo.screens[i];
624 if(disableBackingStore) 621 pScreen->backingStoreSupport = NotUseful;
625 pScreen->backingStoreSupport = NotUseful;
626 if(disableSaveUnders)
627 pScreen->saveUnderSupport = NotUseful;
628 } 622 }
629 } 623 }
630 624
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)
557 root.maxInstalledMaps = pScreen->maxInstalledCmaps; 557 root.maxInstalledMaps = pScreen->maxInstalledCmaps;
558 root.rootVisualID = pScreen->rootVisual; 558 root.rootVisualID = pScreen->rootVisual;
559 root.backingStore = pScreen->backingStoreSupport; 559 root.backingStore = pScreen->backingStoreSupport;
560 root.saveUnders = pScreen->saveUnderSupport != NotUseful; 560 root.saveUnders = FALSE;
561 root.rootDepth = pScreen->rootDepth; 561 root.rootDepth = pScreen->rootDepth;
562 root.nDepths = pScreen->numDepths; 562 root.nDepths = pScreen->numDepths;
563 memmove(pBuf, (char *)&root, sizeof(xWindowRoot)); 563 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);
179 179
180#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent)) 180#define SubStrSend(pWin,pParent) (StrSend(pWin) || SubSend(pParent))
181 181
182_X_EXPORT int numSaveUndersViewable = 0;
183_X_EXPORT int deltaSaveUndersViewable = 0;
184
185#ifdef DEBUG 182#ifdef DEBUG
186/****** 183/******
187 * PrintWindowTree 184 * PrintWindowTree
@@ -269,8 +266,6 @@ int defaultBackingStore = NotUseful;
269/* hack to force no backing store */ 266/* hack to force no backing store */
270Bool disableBackingStore = FALSE; 267Bool disableBackingStore = FALSE;
271Bool enableBackingStore = FALSE; 268Bool enableBackingStore = FALSE;
272/* hack to force no save unders */
273Bool disableSaveUnders = FALSE;
274 269
275static void 270static void
276SetWindowToDefaults(WindowPtr pWin) 271SetWindowToDefaults(WindowPtr pWin)
@@ -470,20 +465,7 @@ CreateRootWindow(ScreenPtr pScreen)
470 if (enableBackingStore) 465 if (enableBackingStore)
471 pScreen->backingStoreSupport = Always; 466 pScreen->backingStoreSupport = Always;
472 467
473#ifdef DO_SAVE_UNDERS 468 pScreen->saveUnderSupport = NotUseful;
474 if ((pScreen->backingStoreSupport != NotUseful) &&
475 (pScreen->saveUnderSupport == NotUseful))
476 {
477 /*
478 * If the screen has backing-store but no save-unders, let the
479 * clients know we can support save-unders using backing-store.
480 */
481 pScreen->saveUnderSupport = USE_DIX_SAVE_UNDERS;
482 }
483#endif /* DO_SAVE_UNDERS */
484
485 if (disableSaveUnders)
486 pScreen->saveUnderSupport = NotUseful;
487 469
488 return TRUE; 470 return TRUE;
489} 471}
@@ -927,10 +909,6 @@ CrushTree(WindowPtr pWin)
927 } 909 }
928 FreeResource(pChild->drawable.id, RT_WINDOW); 910 FreeResource(pChild->drawable.id, RT_WINDOW);
929 pSib = pChild->nextSib; 911 pSib = pChild->nextSib;
930#ifdef DO_SAVE_UNDERS
931 if (pChild->saveUnder && pChild->viewable)
932 deltaSaveUndersViewable--;
933#endif
934 pChild->viewable = FALSE; 912 pChild->viewable = FALSE;
935 if (pChild->realized) 913 if (pChild->realized)
936 { 914 {
@@ -1257,47 +1235,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
1257 client->errorValue = val; 1235 client->errorValue = val;
1258 goto PatchUp; 1236 goto PatchUp;
1259 } 1237 }
1260#ifdef DO_SAVE_UNDERS
1261 if (pWin->parent && (pWin->saveUnder != val) && (pWin->viewable) &&
1262 DO_SAVE_UNDERS(pWin))
1263 {
1264 /*
1265 * Re-check all siblings and inferiors for obscurity or
1266 * exposition (hee hee).
1267 */
1268 if (pWin->saveUnder)
1269 deltaSaveUndersViewable--;
1270 else
1271 deltaSaveUndersViewable++;
1272 pWin->saveUnder = val;
1273
1274 if (pWin->firstChild)
1275 {
1276 pLayerWin = (*pScreen->GetLayerWindow)(pWin);
1277 if ((*pScreen->ChangeSaveUnder)(pLayerWin->parent, pWin->nextSib))
1278 (*pScreen->PostChangeSaveUnder)(pLayerWin->parent,
1279 pWin->nextSib);
1280 }
1281 else
1282 {
1283 if ((*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib))
1284 (*pScreen->PostChangeSaveUnder)(pWin,
1285 pWin->nextSib);
1286 }
1287 }
1288 else
1289 {
1290 /* If we're changing the saveUnder attribute of the root
1291 * window, all we do is set pWin->saveUnder so that
1292 * GetWindowAttributes returns the right value. We don't
1293 * do the "normal" save-under processing (as above).
1294 * Hope that doesn't cause any problems.
1295 */
1296 pWin->saveUnder = val;
1297 }
1298#else
1299 pWin->saveUnder = val; 1238 pWin->saveUnder = val;
1300#endif /* DO_SAVE_UNDERS */
1301 break; 1239 break;
1302 case CWEventMask: 1240 case CWEventMask:
1303 rc = EventSelectForWindow(pWin, client, (Mask )*pVlist); 1241 rc = EventSelectForWindow(pWin, client, (Mask )*pVlist);
@@ -2199,9 +2137,6 @@ ReflectStackChange(
2199 Bool WasViewable = (Bool)pWin->viewable; 2137 Bool WasViewable = (Bool)pWin->viewable;
2200 Bool anyMarked; 2138 Bool anyMarked;
2201 WindowPtr pFirstChange; 2139 WindowPtr pFirstChange;
2202#ifdef DO_SAVE_UNDERS
2203 Bool dosave = FALSE;
2204#endif
2205 WindowPtr pLayerWin; 2140 WindowPtr pLayerWin;
2206 ScreenPtr pScreen = pWin->drawable.pScreen; 2141 ScreenPtr pScreen = pWin->drawable.pScreen;
2207 2142
@@ -2216,21 +2151,11 @@ ReflectStackChange(
2216 anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, 2151 anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange,
2217 &pLayerWin); 2152 &pLayerWin);
2218 if (pLayerWin != pWin) pFirstChange = pLayerWin; 2153 if (pLayerWin != pWin) pFirstChange = pLayerWin;
2219#ifdef DO_SAVE_UNDERS
2220 if (DO_SAVE_UNDERS(pWin))
2221 {
2222 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange);
2223 }
2224#endif /* DO_SAVE_UNDERS */
2225 if (anyMarked) 2154 if (anyMarked)
2226 { 2155 {
2227 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind); 2156 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, kind);
2228 (*pScreen->HandleExposures)(pLayerWin->parent); 2157 (*pScreen->HandleExposures)(pLayerWin->parent);
2229 } 2158 }
2230#ifdef DO_SAVE_UNDERS
2231 if (dosave)
2232 (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
2233#endif /* DO_SAVE_UNDERS */
2234 if (anyMarked && pWin->drawable.pScreen->PostValidateTree) 2159 if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
2235 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind); 2160 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, kind);
2236 } 2161 }
@@ -2681,10 +2606,6 @@ RealizeTree(WindowPtr pWin)
2681 if (pChild->mapped) 2606 if (pChild->mapped)
2682 { 2607 {
2683 pChild->realized = TRUE; 2608 pChild->realized = TRUE;
2684#ifdef DO_SAVE_UNDERS
2685 if (pChild->saveUnder)
2686 deltaSaveUndersViewable++;
2687#endif
2688 pChild->viewable = (pChild->drawable.class == InputOutput); 2609 pChild->viewable = (pChild->drawable.class == InputOutput);
2689 (* Realize)(pChild); 2610 (* Realize)(pChild);
2690 if (pChild->firstChild) 2611 if (pChild->firstChild)
@@ -2739,9 +2660,6 @@ MapWindow(WindowPtr pWin, ClientPtr client)
2739 ScreenPtr pScreen; 2660 ScreenPtr pScreen;
2740 2661
2741 WindowPtr pParent; 2662 WindowPtr pParent;
2742#ifdef DO_SAVE_UNDERS
2743 Bool dosave = FALSE;
2744#endif
2745 WindowPtr pLayerWin; 2663 WindowPtr pLayerWin;
2746 2664
2747 if (pWin->mapped) 2665 if (pWin->mapped)
@@ -2787,21 +2705,11 @@ MapWindow(WindowPtr pWin, ClientPtr client)
2787 { 2705 {
2788 anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, 2706 anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin,
2789 &pLayerWin); 2707 &pLayerWin);
2790#ifdef DO_SAVE_UNDERS
2791 if (DO_SAVE_UNDERS(pWin))
2792 {
2793 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib);
2794 }
2795#endif /* DO_SAVE_UNDERS */
2796 if (anyMarked) 2708 if (anyMarked)
2797 { 2709 {
2798 (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap); 2710 (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
2799 (*pScreen->HandleExposures)(pLayerWin->parent); 2711 (*pScreen->HandleExposures)(pLayerWin->parent);
2800 } 2712 }
2801#ifdef DO_SAVE_UNDERS
2802 if (dosave)
2803 (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
2804#endif /* DO_SAVE_UNDERS */
2805 if (anyMarked && pScreen->PostValidateTree) 2713 if (anyMarked && pScreen->PostValidateTree)
2806 (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap); 2714 (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, VTMap);
2807 } 2715 }
@@ -2841,17 +2749,11 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
2841{ 2749{
2842 WindowPtr pWin; 2750 WindowPtr pWin;
2843 WindowPtr pFirstMapped = NullWindow; 2751 WindowPtr pFirstMapped = NullWindow;
2844#ifdef DO_SAVE_UNDERS
2845 WindowPtr pFirstSaveUndered = NullWindow;
2846#endif
2847 ScreenPtr pScreen; 2752 ScreenPtr pScreen;
2848 Mask parentRedirect; 2753 Mask parentRedirect;
2849 Mask parentNotify; 2754 Mask parentNotify;
2850 xEvent event; 2755 xEvent event;
2851 Bool anyMarked; 2756 Bool anyMarked;
2852#ifdef DO_SAVE_UNDERS
2853 Bool dosave = FALSE;
2854#endif
2855 WindowPtr pLayerWin; 2757 WindowPtr pLayerWin;
2856 2758
2857 pScreen = pParent->drawable.pScreen; 2759 pScreen = pParent->drawable.pScreen;
@@ -2891,12 +2793,6 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
2891 { 2793 {
2892 anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, 2794 anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
2893 (WindowPtr *)NULL); 2795 (WindowPtr *)NULL);
2894#ifdef DO_SAVE_UNDERS
2895 if (DO_SAVE_UNDERS(pWin))
2896 {
2897 dosave = TRUE;
2898 }
2899#endif /* DO_SAVE_UNDERS */
2900 } 2796 }
2901 } 2797 }
2902 } 2798 }
@@ -2913,38 +2809,9 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
2913 } 2809 }
2914 if (anyMarked) 2810 if (anyMarked)
2915 { 2811 {
2916#ifdef DO_SAVE_UNDERS
2917 if (pLayerWin->parent != pParent)
2918 {
2919 if (dosave || (DO_SAVE_UNDERS(pLayerWin)))
2920 {
2921 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin,
2922 pLayerWin);
2923 }
2924 }
2925 else if (dosave)
2926 {
2927 dosave = FALSE;
2928 for (pWin = pParent->firstChild; pWin; pWin = pWin->nextSib)
2929 {
2930 if (DO_SAVE_UNDERS(pWin))
2931 {
2932 dosave |= (*pScreen->ChangeSaveUnder)(pWin,
2933 pWin->nextSib);
2934 if (dosave && !pFirstSaveUndered)
2935 pFirstSaveUndered = pWin;
2936 }
2937 }
2938 }
2939#endif /* DO_SAVE_UNDERS */
2940 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap); 2812 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstMapped, VTMap);
2941 (*pScreen->HandleExposures)(pLayerWin->parent); 2813 (*pScreen->HandleExposures)(pLayerWin->parent);
2942 } 2814 }
2943#ifdef DO_SAVE_UNDERS
2944 if (dosave)
2945 (*pScreen->PostChangeSaveUnder)(pLayerWin,
2946 pFirstSaveUndered->nextSib);
2947#endif /* DO_SAVE_UNDERS */
2948 if (anyMarked && pScreen->PostValidateTree) 2815 if (anyMarked && pScreen->PostValidateTree)
2949 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped, 2816 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstMapped,
2950 VTMap); 2817 VTMap);
@@ -2984,10 +2851,6 @@ UnrealizeTree(
2984 DeleteWindowFromAnyEvents(pChild, FALSE); 2851 DeleteWindowFromAnyEvents(pChild, FALSE);
2985 if (pChild->viewable) 2852 if (pChild->viewable)
2986 { 2853 {
2987#ifdef DO_SAVE_UNDERS
2988 if (pChild->saveUnder)
2989 deltaSaveUndersViewable--;
2990#endif
2991 pChild->viewable = FALSE; 2854 pChild->viewable = FALSE;
2992 (* MarkUnrealizedWindow)(pChild, pWin, fromConfigure); 2855 (* MarkUnrealizedWindow)(pChild, pWin, fromConfigure);
2993 pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; 2856 pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER;
@@ -3048,16 +2911,6 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
3048 (*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap); 2911 (*pScreen->ValidateTree)(pLayerWin->parent, pWin, VTUnmap);
3049 (*pScreen->HandleExposures)(pLayerWin->parent); 2912 (*pScreen->HandleExposures)(pLayerWin->parent);
3050 } 2913 }
3051#ifdef DO_SAVE_UNDERS
3052 if (DO_SAVE_UNDERS(pWin))
3053 {
3054 if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib) )
3055 {
3056 (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
3057 }
3058 }
3059 pWin->DIXsaveUnder = FALSE;
3060#endif /* DO_SAVE_UNDERS */
3061 if (!fromConfigure && pScreen->PostValidateTree) 2914 if (!fromConfigure && pScreen->PostValidateTree)
3062 (*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap); 2915 (*pScreen->PostValidateTree)(pLayerWin->parent, pWin, VTUnmap);
3063 } 2916 }
@@ -3113,9 +2966,6 @@ UnmapSubwindows(WindowPtr pWin)
3113 UnrealizeTree(pChild, FALSE); 2966 UnrealizeTree(pChild, FALSE);
3114 if (wasViewable) 2967 if (wasViewable)
3115 { 2968 {
3116#ifdef DO_SAVE_UNDERS
3117 pChild->DIXsaveUnder = FALSE;
3118#endif /* DO_SAVE_UNDERS */
3119 } 2969 }
3120 } 2970 }
3121 } 2971 }
@@ -3145,13 +2995,6 @@ UnmapSubwindows(WindowPtr pWin)
3145 (*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap); 2995 (*pScreen->ValidateTree)(pLayerWin->parent, pHead, VTUnmap);
3146 (*pScreen->HandleExposures)(pLayerWin->parent); 2996 (*pScreen->HandleExposures)(pLayerWin->parent);
3147 } 2997 }
3148#ifdef DO_SAVE_UNDERS
3149 if (DO_SAVE_UNDERS(pWin))
3150 {
3151 if ( (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin))
3152 (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
3153 }
3154#endif /* DO_SAVE_UNDERS */
3155 if (anyMarked && pScreen->PostValidateTree) 2998 if (anyMarked && pScreen->PostValidateTree)
3156 (*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap); 2999 (*pScreen->PostValidateTree)(pLayerWin->parent, pHead, VTUnmap);
3157 } 3000 }
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)
102 Bool WasViewable; 102 Bool WasViewable;
103 Bool anyMarked = FALSE; 103 Bool anyMarked = FALSE;
104 RegionPtr pOldClip = 0; 104 RegionPtr pOldClip = 0;
105#ifdef DO_SAVE_UNDERS
106 Bool dosave = FALSE;
107#endif
108 WindowPtr pLayerWin; 105 WindowPtr pLayerWin;
109 BoxRec box; 106 BoxRec box;
110 107
@@ -171,12 +168,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
171 anyMarked = TRUE; 168 anyMarked = TRUE;
172 } 169 }
173 170
174#ifdef DO_SAVE_UNDERS
175 if (DO_SAVE_UNDERS(pWin))
176 {
177 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
178 }
179#endif /* DO_SAVE_UNDERS */
180 171
181 if (anyMarked) 172 if (anyMarked)
182 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); 173 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -186,10 +177,6 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable)
186 { 177 {
187 if (anyMarked) 178 if (anyMarked)
188 (*pScreen->HandleExposures)(pWin); 179 (*pScreen->HandleExposures)(pWin);
189#ifdef DO_SAVE_UNDERS
190 if (dosave)
191 (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
192#endif /* DO_SAVE_UNDERS */
193 if (anyMarked && pScreen->PostValidateTree) 180 if (anyMarked && pScreen->PostValidateTree)
194 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); 181 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
195 } 182 }
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)
1096 WindowPtr pChild; 1096 WindowPtr pChild;
1097 Bool WasViewable = (Bool)(pWin->viewable); 1097 Bool WasViewable = (Bool)(pWin->viewable);
1098 Bool anyMarked = FALSE; 1098 Bool anyMarked = FALSE;
1099#ifdef DO_SAVE_UNDERS
1100 Bool dosave = FALSE;
1101#endif
1102 WindowPtr pLayerWin; 1099 WindowPtr pLayerWin;
1103 BoxRec box; 1100 BoxRec box;
1104 1101
@@ -1168,12 +1165,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
1168 anyMarked = TRUE; 1165 anyMarked = TRUE;
1169 } 1166 }
1170 1167
1171#ifdef DO_SAVE_UNDERS
1172 if (DO_SAVE_UNDERS(pWin))
1173 {
1174 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
1175 }
1176#endif /* DO_SAVE_UNDERS */
1177 1168
1178 if (anyMarked) 1169 if (anyMarked)
1179 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); 1170 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1183,10 +1174,6 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
1183 { 1174 {
1184 if (anyMarked) 1175 if (anyMarked)
1185 (*pScreen->HandleExposures)(pWin); 1176 (*pScreen->HandleExposures)(pWin);
1186#ifdef DO_SAVE_UNDERS
1187 if (dosave)
1188 (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
1189#endif /* DO_SAVE_UNDERS */
1190 if (anyMarked && pScreen->PostValidateTree) 1177 if (anyMarked && pScreen->PostValidateTree)
1191 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); 1178 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
1192 } 1179 }
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[] = {
323 SYMFUNC(TraverseTree) 323 SYMFUNC(TraverseTree)
324 SYMFUNC(UnmapWindow) 324 SYMFUNC(UnmapWindow)
325 SYMFUNC(WalkTree) 325 SYMFUNC(WalkTree)
326 SYMVAR(deltaSaveUndersViewable)
327 SYMVAR(numSaveUndersViewable)
328 SYMVAR(savedScreenInfo) 326 SYMVAR(savedScreenInfo)
329 SYMVAR(screenIsSaved) 327 SYMVAR(screenIsSaved)
330 328
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)
900 Bool WasViewable = (Bool)(pWin->viewable); 900 Bool WasViewable = (Bool)(pWin->viewable);
901 Bool anyMarked = TRUE; 901 Bool anyMarked = TRUE;
902 RegionPtr pOldClip = NULL, bsExposed; 902 RegionPtr pOldClip = NULL, bsExposed;
903#ifdef DO_SAVE_UNDERS
904 Bool dosave = FALSE;
905#endif
906 WindowPtr pLayerWin; 903 WindowPtr pLayerWin;
907 BoxRec box; 904 BoxRec box;
908 905
@@ -973,12 +970,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
973 anyMarked = TRUE; 970 anyMarked = TRUE;
974 } 971 }
975 972
976#ifdef DO_SAVE_UNDERS
977 if (DO_SAVE_UNDERS(pWin))
978 {
979 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
980 }
981#endif /* DO_SAVE_UNDERS */
982 973
983 if (anyMarked) 974 if (anyMarked)
984 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther); 975 (*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
@@ -1010,10 +1001,6 @@ xf86SetRootClip (ScreenPtr pScreen, int enable)
1010 { 1001 {
1011 if (anyMarked) 1002 if (anyMarked)
1012 (*pScreen->HandleExposures)(pWin); 1003 (*pScreen->HandleExposures)(pWin);
1013#ifdef DO_SAVE_UNDERS
1014 if (dosave)
1015 (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
1016#endif /* DO_SAVE_UNDERS */
1017 if (anyMarked && pScreen->PostValidateTree) 1004 if (anyMarked && pScreen->PostValidateTree)
1018 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther); 1005 (*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
1019 } 1006 }
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;
54extern int defaultBackingStore; 54extern int defaultBackingStore;
55extern Bool disableBackingStore; 55extern Bool disableBackingStore;
56extern Bool enableBackingStore; 56extern Bool enableBackingStore;
57extern Bool disableSaveUnders;
58extern Bool PartialNetwork; 57extern Bool PartialNetwork;
59#ifndef NOLOGOHACK 58#ifndef NOLOGOHACK
60extern int logoScreenSaver; 59extern 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 {
257 char focusinout[(MAX_DEVICES + 7)/8]; 257 char focusinout[(MAX_DEVICES + 7)/8];
258} FocusSemaphoresRec, *FocusSemaphoresPtr; 258} FocusSemaphoresRec, *FocusSemaphoresPtr;
259 259
260/*
261 * this is the configuration parameter "NO_BACK_SAVE"
262 * it means that any existant backing store should not
263 * be used to implement save unders.
264 */
265
266#ifndef NO_BACK_SAVE
267#define DO_SAVE_UNDERS(pWin) ((pWin)->drawable.pScreen->saveUnderSupport ==\
268 USE_DIX_SAVE_UNDERS)
269/*
270 * saveUnderSupport is set to this magic value when using DIXsaveUnders
271 */
272
273#define USE_DIX_SAVE_UNDERS 0x40
274#endif
275
276extern int numSaveUndersViewable;
277extern int deltaSaveUndersViewable;
278
279#ifdef XEVIE 260#ifdef XEVIE
280extern WindowPtr xeviewin; 261extern WindowPtr xeviewin;
281#endif 262#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(
485 Bool /*generateExposures*/ 485 Bool /*generateExposures*/
486); 486);
487 487
488extern Bool miChangeSaveUnder(
489 WindowPtr /*pWin*/,
490 WindowPtr /*first*/
491);
492
493extern void miPostChangeSaveUnder(
494 WindowPtr /*pWin*/,
495 WindowPtr /*pFirst*/
496);
497
498extern void miMarkWindow( 488extern void miMarkWindow(
499 WindowPtr /*pWin*/ 489 WindowPtr /*pWin*/
500); 490);
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(
929 short bw; 929 short bw;
930 RegionRec overReg, underReg; 930 RegionRec overReg, underReg;
931 DDXPointRec oldpt; 931 DDXPointRec oldpt;
932#ifdef DO_SAVE_UNDERS
933 Bool dosave = FALSE;
934#endif
935 932
936 if (!(pParent = pWin->parent)) 933 if (!(pParent = pWin->parent))
937 return ; 934 return ;
@@ -969,10 +966,6 @@ miOverlayMoveWindow(
969 miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); 966 miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
970 (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL); 967 (*pScreen->MarkOverlappedWindows) (pWin, windowToValidate, NULL);
971 968
972#ifdef DO_SAVE_UNDERS
973 if (DO_SAVE_UNDERS(pWin))
974 dosave = (*pScreen->ChangeSaveUnder)(pWin, windowToValidate);
975#endif /* DO_SAVE_UNDERS */
976 969
977 (*pScreen->ValidateTree)(pWin->parent, NullWindow, kind); 970 (*pScreen->ValidateTree)(pWin->parent, NullWindow, kind);
978 if(REGION_NOTEMPTY(pScreen, &underReg)) { 971 if(REGION_NOTEMPTY(pScreen, &underReg)) {
@@ -987,10 +980,6 @@ miOverlayMoveWindow(
987 REGION_UNINIT(pScreen, &overReg); 980 REGION_UNINIT(pScreen, &overReg);
988 (*pScreen->HandleExposures)(pWin->parent); 981 (*pScreen->HandleExposures)(pWin->parent);
989 982
990#ifdef DO_SAVE_UNDERS
991 if (dosave)
992 (*pScreen->PostChangeSaveUnder)(pWin, windowToValidate);
993#endif /* DO_SAVE_UNDERS */
994 if (pScreen->PostValidateTree) 983 if (pScreen->PostValidateTree)
995 (*pScreen->PostValidateTree)(pWin->parent, NullWindow, kind); 984 (*pScreen->PostValidateTree)(pWin->parent, NullWindow, kind);
996 } 985 }
@@ -1147,9 +1136,6 @@ miOverlayResizeWindow(
1147 RegionPtr borderVisible2 = NullRegion; 1136 RegionPtr borderVisible2 = NullRegion;
1148 Bool shrunk = FALSE; /* shrunk in an inner dimension */ 1137 Bool shrunk = FALSE; /* shrunk in an inner dimension */
1149 Bool moved = FALSE; /* window position changed */ 1138 Bool moved = FALSE; /* window position changed */
1150#ifdef DO_SAVE_UNDERS
1151 Bool dosave = FALSE;
1152#endif
1153 Bool doUnderlay; 1139 Bool doUnderlay;
1154 1140
1155 /* if this is a root window, can't be resized */ 1141 /* if this is a root window, can't be resized */
@@ -1279,10 +1265,6 @@ miOverlayResizeWindow(
1279 if(pTree) 1265 if(pTree)
1280 pTree->valdata->borderVisible = borderVisible2; 1266 pTree->valdata->borderVisible = borderVisible2;
1281 1267
1282#ifdef DO_SAVE_UNDERS
1283 if (DO_SAVE_UNDERS(pWin))
1284 dosave = (*pScreen->ChangeSaveUnder)(pWin, pFirstChange);
1285#endif /* DO_SAVE_UNDERS */
1286 1268
1287 (*pScreen->ValidateTree)(pWin->parent, pFirstChange, VTOther); 1269 (*pScreen->ValidateTree)(pWin->parent, pFirstChange, VTOther);
1288 /* 1270 /*
@@ -1504,10 +1486,6 @@ miOverlayResizeWindow(
1504 if (destClip2) 1486 if (destClip2)
1505 REGION_DESTROY(pScreen, destClip2); 1487 REGION_DESTROY(pScreen, destClip2);
1506 (*pScreen->HandleExposures)(pWin->parent); 1488 (*pScreen->HandleExposures)(pWin->parent);
1507#ifdef DO_SAVE_UNDERS
1508 if (dosave)
1509 (*pScreen->PostChangeSaveUnder)(pWin, pFirstChange);
1510#endif /* DO_SAVE_UNDERS */
1511 if (pScreen->PostValidateTree) 1489 if (pScreen->PostValidateTree)
1512 (*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther); 1490 (*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther);
1513 } 1491 }
@@ -1521,9 +1499,6 @@ miOverlaySetShape(WindowPtr pWin)
1521{ 1499{
1522 Bool WasViewable = (Bool)(pWin->viewable); 1500 Bool WasViewable = (Bool)(pWin->viewable);
1523 ScreenPtr pScreen = pWin->drawable.pScreen; 1501 ScreenPtr pScreen = pWin->drawable.pScreen;
1524#ifdef DO_SAVE_UNDERS
1525 Bool dosave = FALSE;
1526#endif
1527 1502
1528 if (WasViewable) { 1503 if (WasViewable) {
1529 (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); 1504 (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
@@ -1556,20 +1531,12 @@ miOverlaySetShape(WindowPtr pWin)
1556 if (WasViewable) { 1531 if (WasViewable) {
1557 (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); 1532 (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL);
1558 1533
1559#ifdef DO_SAVE_UNDERS
1560 if (DO_SAVE_UNDERS(pWin))
1561 dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin);
1562#endif /* DO_SAVE_UNDERS */
1563 1534
1564 (*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther); 1535 (*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther);
1565 } 1536 }
1566 1537
1567 if (WasViewable) { 1538 if (WasViewable) {
1568 (*pScreen->HandleExposures)(pWin->parent); 1539 (*pScreen->HandleExposures)(pWin->parent);
1569#ifdef DO_SAVE_UNDERS
1570 if (dosave)
1571 (*pScreen->PostChangeSaveUnder)(pWin, pWin);
1572#endif /* DO_SAVE_UNDERS */
1573 if (pScreen->PostValidateTree) 1540 if (pScreen->PostValidateTree)
1574 (*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther); 1541 (*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther);
1575 } 1542 }
@@ -1589,9 +1556,6 @@ miOverlayChangeBorderWidth(
1589 ScreenPtr pScreen; 1556 ScreenPtr pScreen;
1590 Bool WasViewable = (Bool)(pWin->viewable); 1557 Bool WasViewable = (Bool)(pWin->viewable);
1591 Bool HadBorder; 1558 Bool HadBorder;
1592#ifdef DO_SAVE_UNDERS
1593 Bool dosave = FALSE;
1594#endif
1595 1559
1596 oldwidth = wBorderWidth (pWin); 1560 oldwidth = wBorderWidth (pWin);
1597 if (oldwidth == width) 1561 if (oldwidth == width)
@@ -1625,17 +1589,9 @@ miOverlayChangeBorderWidth(
1625 } 1589 }
1626 } 1590 }
1627 } 1591 }
1628#ifdef DO_SAVE_UNDERS
1629 if (DO_SAVE_UNDERS(pWin))
1630 dosave = (*pScreen->ChangeSaveUnder)(pWin, pWin->nextSib);
1631#endif /* DO_SAVE_UNDERS */
1632 (*pScreen->ValidateTree)(pWin->parent, pWin, VTOther); 1592 (*pScreen->ValidateTree)(pWin->parent, pWin, VTOther);
1633 (*pScreen->HandleExposures)(pWin->parent); 1593 (*pScreen->HandleExposures)(pWin->parent);
1634 1594
1635#ifdef DO_SAVE_UNDERS
1636 if (dosave)
1637 (*pScreen->PostChangeSaveUnder)(pWin, pWin->nextSib);
1638#endif /* DO_SAVE_UNDERS */
1639 if (pScreen->PostValidateTree) 1595 if (pScreen->PostValidateTree)
1640 (*pScreen->PostValidateTree)(pWin->parent, pWin, VTOther); 1596 (*pScreen->PostValidateTree)(pWin->parent, pWin, VTOther);
1641 } 1597 }
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(
257 pScreen->wakeupData = (pointer)0; 257 pScreen->wakeupData = (pointer)0;
258 pScreen->MarkWindow = miMarkWindow; 258 pScreen->MarkWindow = miMarkWindow;
259 pScreen->MarkOverlappedWindows = miMarkOverlappedWindows; 259 pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
260 pScreen->ChangeSaveUnder = miChangeSaveUnder; 260 pScreen->ChangeSaveUnder = NULL;
261 pScreen->PostChangeSaveUnder = miPostChangeSaveUnder; 261 pScreen->PostChangeSaveUnder = NULL;
262 pScreen->MoveWindow = miMoveWindow; 262 pScreen->MoveWindow = miMoveWindow;
263 pScreen->ResizeWindow = miSlideAndSizeWindow; 263 pScreen->ResizeWindow = miSlideAndSizeWindow;
264 pScreen->GetLayerWindow = miGetLayerWindow; 264 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,
122 REGION_DESTROY(pScreen, pBSReg); 122 REGION_DESTROY(pScreen, pBSReg);
123} 123}
124 124
125/*
126 * For SaveUnders using backing-store. The idea is that when a window is mapped
127 * with saveUnder set TRUE, any windows it obscures will have its backing
128 * store turned on setting the DIXsaveUnder bit,
129 * The backing-store code must be written to allow for this
130 */
131
132/*-
133 *-----------------------------------------------------------------------
134 * miCheckSubSaveUnder --
135 * Check all the inferiors of a window for coverage by saveUnder
136 * windows. Called from ChangeSaveUnder and CheckSaveUnder.
137 * This code is very inefficient.
138 *
139 * Results:
140 * TRUE if any windows need to have backing-store removed.
141 *
142 * Side Effects:
143 * Windows may have backing-store turned on or off.
144 *
145 *-----------------------------------------------------------------------
146 */
147static Bool
148miCheckSubSaveUnder(
149 WindowPtr pParent, /* Parent to check */
150 WindowPtr pFirst, /* first reconfigured window */
151 RegionPtr pRegion) /* Initial area obscured by saveUnder */
152{
153 WindowPtr pChild; /* Current child */
154 ScreenPtr pScreen; /* Screen to use */
155 RegionRec SubRegion; /* Area of children obscured */
156 Bool res = FALSE; /* result */
157 Bool subInited=FALSE;/* SubRegion initialized */
158
159 pScreen = pParent->drawable.pScreen;
160 if ( (pChild = pParent->firstChild) )
161 {
162 /*
163 * build region above first changed window
164 */
165
166 for (; pChild != pFirst; pChild = pChild->nextSib)
167 if (pChild->viewable && pChild->saveUnder)
168 REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
169
170 /*
171 * check region below and including first changed window
172 */
173
174 for (; pChild; pChild = pChild->nextSib)
175 {
176 if (pChild->viewable)
177 {
178 /*
179 * don't save under nephew/niece windows;
180 * use a separate region
181 */
182
183 if (pChild->firstChild)
184 {
185 if (!subInited)
186 {
187 REGION_NULL(pScreen, &SubRegion);
188 subInited = TRUE;
189 }
190 REGION_COPY(pScreen, &SubRegion, pRegion);
191 res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
192 &SubRegion);
193 }
194 else
195 {
196 res |= miCheckSubSaveUnder(pChild, pChild->firstChild,
197 pRegion);
198 }
199
200 if (pChild->saveUnder)
201 REGION_UNION(pScreen, pRegion, pRegion, &pChild->borderSize);
202 }
203 }
204
205 if (subInited)
206 REGION_UNINIT(pScreen, &SubRegion);
207 }
208
209 /*
210 * Check the state of this window. DIX save unders are
211 * enabled for viewable windows with some client expressing
212 * exposure interest and which intersect the save under region
213 */
214
215 if (pParent->viewable &&
216 ((pParent->eventMask | wOtherEventMasks(pParent)) & ExposureMask) &&
217 REGION_NOTEMPTY(pScreen, &pParent->borderSize) &&
218 RECT_IN_REGION(pScreen, pRegion, REGION_EXTENTS(pScreen,
219 &pParent->borderSize)) != rgnOUT)
220 {
221 if (!pParent->DIXsaveUnder)
222 {
223 pParent->DIXsaveUnder = TRUE;
224 (*pScreen->ChangeWindowAttributes) (pParent, CWBackingStore);
225 }
226 }
227 else
228 {
229 if (pParent->DIXsaveUnder)
230 {
231 res = TRUE;
232 pParent->DIXsaveUnder = FALSE;
233 }
234 }
235 return res;
236}
237
238
239/*-
240 *-----------------------------------------------------------------------
241 * miChangeSaveUnder --
242 * Change the save-under state of a tree of windows. Called when
243 * a window with saveUnder TRUE is mapped/unmapped/reconfigured.
244 *
245 * Results:
246 * TRUE if any windows need to have backing-store removed (which
247 * means that PostChangeSaveUnder needs to be called later to
248 * finish the job).
249 *
250 * Side Effects:
251 * Windows may have backing-store turned on or off.
252 *
253 *-----------------------------------------------------------------------
254 */
255Bool
256miChangeSaveUnder(
257 WindowPtr pWin,
258 WindowPtr first /* First window to check.
259 * Used when pWin was restacked */
260 )
261{
262 RegionRec rgn; /* Area obscured by saveUnder windows */
263 ScreenPtr pScreen;
264 Bool res;
265
266 if (!deltaSaveUndersViewable && !numSaveUndersViewable)
267 return FALSE;
268 numSaveUndersViewable += deltaSaveUndersViewable;
269 deltaSaveUndersViewable = 0;
270 pScreen = pWin->drawable.pScreen;
271 REGION_NULL(pScreen, &rgn);
272 res = miCheckSubSaveUnder (pWin->parent,
273 pWin->saveUnder ? first : pWin->nextSib,
274 &rgn);
275 REGION_UNINIT(pScreen, &rgn);
276 return res;
277}
278
279/*-
280 *-----------------------------------------------------------------------
281 * miPostChangeSaveUnder --
282 * Actually turn backing-store off for those windows that no longer
283 * need to have it on.
284 *
285 * Results:
286 * None.
287 *
288 * Side Effects:
289 * Backing-store and SAVE_UNDER_CHANGE_BIT are turned off for those
290 * windows affected.
291 *
292 *-----------------------------------------------------------------------
293 */
294void
295miPostChangeSaveUnder(WindowPtr pWin, WindowPtr pFirst)
296{
297 WindowPtr pParent, pChild;
298 ChangeWindowAttributesProcPtr ChangeWindowAttributes;
299
300 if (!(pParent = pWin->parent))
301 return;
302 ChangeWindowAttributes = pParent->drawable.pScreen->ChangeWindowAttributes;
303 if (!pParent->DIXsaveUnder &&
304 (pParent->backingStore == NotUseful) && pParent->backStorage)
305 (*ChangeWindowAttributes)(pParent, CWBackingStore);
306 if (!(pChild = pFirst))
307 return;
308 while (1)
309 {
310 if (!pChild->DIXsaveUnder &&
311 (pChild->backingStore == NotUseful) && pChild->backStorage)
312 (*ChangeWindowAttributes)(pChild, CWBackingStore);
313 if (pChild->firstChild)
314 {
315 pChild = pChild->firstChild;
316 continue;
317 }
318 while (!pChild->nextSib)
319 {
320 pChild = pChild->parent;
321 if (pChild == pParent)
322 return;
323 }
324 pChild = pChild->nextSib;
325 }
326}
327
328void 125void
329miMarkWindow(WindowPtr pWin) 126miMarkWindow(WindowPtr pWin)
330{ 127{
@@ -474,9 +271,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
474 Bool anyMarked = FALSE; 271 Bool anyMarked = FALSE;
475 ScreenPtr pScreen; 272 ScreenPtr pScreen;
476 WindowPtr windowToValidate; 273 WindowPtr windowToValidate;
477#ifdef DO_SAVE_UNDERS
478 Bool dosave = FALSE;
479#endif
480 WindowPtr pLayerWin; 274 WindowPtr pLayerWin;
481 275
482 /* if this is a root window, can't be moved */ 276 /* 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)
516 anyMarked |= (*pScreen->MarkOverlappedWindows) 310 anyMarked |= (*pScreen->MarkOverlappedWindows)
517 (pWin, pLayerWin, (WindowPtr *)NULL); 311 (pWin, pLayerWin, (WindowPtr *)NULL);
518 312
519#ifdef DO_SAVE_UNDERS
520 if (DO_SAVE_UNDERS(pWin))
521 {
522 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, windowToValidate);
523 }
524#endif /* DO_SAVE_UNDERS */
525 313
526 if (anyMarked) 314 if (anyMarked)
527 { 315 {
@@ -531,10 +319,6 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
531 /* XXX need to retile border if ParentRelative origin */ 319 /* XXX need to retile border if ParentRelative origin */
532 (*pScreen->HandleExposures)(pLayerWin->parent); 320 (*pScreen->HandleExposures)(pLayerWin->parent);
533 } 321 }
534#ifdef DO_SAVE_UNDERS
535 if (dosave)
536 (*pScreen->PostChangeSaveUnder)(pLayerWin, windowToValidate);
537#endif /* DO_SAVE_UNDERS */
538 if (anyMarked && pScreen->PostValidateTree) 322 if (anyMarked && pScreen->PostValidateTree)
539 (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, kind); 323 (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, kind);
540 } 324 }
@@ -606,9 +390,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
606 RegionPtr borderVisible = NullRegion; /* visible area of the border */ 390 RegionPtr borderVisible = NullRegion; /* visible area of the border */
607 Bool shrunk = FALSE; /* shrunk in an inner dimension */ 391 Bool shrunk = FALSE; /* shrunk in an inner dimension */
608 Bool moved = FALSE; /* window position changed */ 392 Bool moved = FALSE; /* window position changed */
609#ifdef DO_SAVE_UNDERS
610 Bool dosave = FALSE;
611#endif
612 WindowPtr pLayerWin; 393 WindowPtr pLayerWin;
613 394
614 /* if this is a root window, can't be resized */ 395 /* if this is a root window, can't be resized */
@@ -721,12 +502,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
721 pWin->valdata->before.borderVisible = borderVisible; 502 pWin->valdata->before.borderVisible = borderVisible;
722 } 503 }
723 504
724#ifdef DO_SAVE_UNDERS
725 if (DO_SAVE_UNDERS(pWin))
726 {
727 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pFirstChange);
728 }
729#endif /* DO_SAVE_UNDERS */
730 505
731 if (anyMarked) 506 if (anyMarked)
732 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, VTOther); 507 (*pScreen->ValidateTree)(pLayerWin->parent, pFirstChange, VTOther);
@@ -889,12 +664,6 @@ miSlideAndSizeWindow(WindowPtr pWin,
889 REGION_DESTROY(pScreen, destClip); 664 REGION_DESTROY(pScreen, destClip);
890 if (anyMarked) 665 if (anyMarked)
891 (*pScreen->HandleExposures)(pLayerWin->parent); 666 (*pScreen->HandleExposures)(pLayerWin->parent);
892#ifdef DO_SAVE_UNDERS
893 if (dosave)
894 {
895 (*pScreen->PostChangeSaveUnder)(pLayerWin, pFirstChange);
896 }
897#endif /* DO_SAVE_UNDERS */
898 if (anyMarked && pScreen->PostValidateTree) 667 if (anyMarked && pScreen->PostValidateTree)
899 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange, 668 (*pScreen->PostValidateTree)(pLayerWin->parent, pFirstChange,
900 VTOther); 669 VTOther);
@@ -922,9 +691,6 @@ miSetShape(WindowPtr pWin)
922 Bool WasViewable = (Bool)(pWin->viewable); 691 Bool WasViewable = (Bool)(pWin->viewable);
923 ScreenPtr pScreen = pWin->drawable.pScreen; 692 ScreenPtr pScreen = pWin->drawable.pScreen;
924 Bool anyMarked = FALSE; 693 Bool anyMarked = FALSE;
925#ifdef DO_SAVE_UNDERS
926 Bool dosave = FALSE;
927#endif
928 WindowPtr pLayerWin; 694 WindowPtr pLayerWin;
929 695
930 if (WasViewable) 696 if (WasViewable)
@@ -956,12 +722,6 @@ miSetShape(WindowPtr pWin)
956 anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, 722 anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin,
957 (WindowPtr *)NULL); 723 (WindowPtr *)NULL);
958 724
959#ifdef DO_SAVE_UNDERS
960 if (DO_SAVE_UNDERS(pWin))
961 {
962 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pLayerWin);
963 }
964#endif /* DO_SAVE_UNDERS */
965 725
966 if (anyMarked) 726 if (anyMarked)
967 (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, VTOther); 727 (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, VTOther);
@@ -971,10 +731,6 @@ miSetShape(WindowPtr pWin)
971 { 731 {
972 if (anyMarked) 732 if (anyMarked)
973 (*pScreen->HandleExposures)(pLayerWin->parent); 733 (*pScreen->HandleExposures)(pLayerWin->parent);
974#ifdef DO_SAVE_UNDERS
975 if (dosave)
976 (*pScreen->PostChangeSaveUnder)(pLayerWin, pLayerWin);
977#endif /* DO_SAVE_UNDERS */
978 if (anyMarked && pScreen->PostValidateTree) 734 if (anyMarked && pScreen->PostValidateTree)
979 (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, VTOther); 735 (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, VTOther);
980 } 736 }
@@ -993,9 +749,6 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
993 ScreenPtr pScreen; 749 ScreenPtr pScreen;
994 Bool WasViewable = (Bool)(pWin->viewable); 750 Bool WasViewable = (Bool)(pWin->viewable);
995 Bool HadBorder; 751 Bool HadBorder;
996#ifdef DO_SAVE_UNDERS
997 Bool dosave = FALSE;
998#endif
999 WindowPtr pLayerWin; 752 WindowPtr pLayerWin;
1000 753
1001 oldwidth = wBorderWidth (pWin); 754 oldwidth = wBorderWidth (pWin);
@@ -1028,22 +781,12 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
1028 pWin->valdata->before.borderVisible = borderVisible; 781 pWin->valdata->before.borderVisible = borderVisible;
1029 } 782 }
1030 } 783 }
1031#ifdef DO_SAVE_UNDERS
1032 if (DO_SAVE_UNDERS(pWin))
1033 {
1034 dosave = (*pScreen->ChangeSaveUnder)(pLayerWin, pWin->nextSib);
1035 }
1036#endif /* DO_SAVE_UNDERS */
1037 784
1038 if (anyMarked) 785 if (anyMarked)
1039 { 786 {
1040 (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTOther); 787 (*pScreen->ValidateTree)(pLayerWin->parent, pLayerWin, VTOther);
1041 (*pScreen->HandleExposures)(pLayerWin->parent); 788 (*pScreen->HandleExposures)(pLayerWin->parent);
1042 } 789 }
1043#ifdef DO_SAVE_UNDERS
1044 if (dosave)
1045 (*pScreen->PostChangeSaveUnder)(pLayerWin, pWin->nextSib);
1046#endif /* DO_SAVE_UNDERS */
1047 if (anyMarked && pScreen->PostValidateTree) 790 if (anyMarked && pScreen->PostValidateTree)
1048 (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin, 791 (*pScreen->PostValidateTree)(pLayerWin->parent, pLayerWin,
1049 VTOther); 792 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)
534 ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); 534 ErrorF("-render [default|mono|gray|color] set render color alloc policy\n");
535#endif 535#endif
536 ErrorF("-s # screen-saver timeout (minutes)\n"); 536 ErrorF("-s # screen-saver timeout (minutes)\n");
537 ErrorF("-su disable any save under support\n");
538 ErrorF("-t # mouse threshold (pixels)\n"); 537 ErrorF("-t # mouse threshold (pixels)\n");
539 ErrorF("-terminate terminate at server reset\n"); 538 ErrorF("-terminate terminate at server reset\n");
540 ErrorF("-to # connection time out\n"); 539 ErrorF("-to # connection time out\n");
@@ -837,8 +836,6 @@ ProcessCommandLine(int argc, char *argv[])
837 else 836 else
838 UseMsg(); 837 UseMsg();
839 } 838 }
840 else if ( strcmp( argv[i], "-su") == 0)
841 disableSaveUnders = TRUE;
842 else if ( strcmp( argv[i], "-t") == 0) 839 else if ( strcmp( argv[i], "-t") == 0)
843 { 840 {
844 if(++i < argc) 841 if(++i < argc)