68
Copied from the xfree86 DDX
70
Why can't this be in DIX?
71
Does union _Validate vary depending on DDX??
74
xf86SetRootClip (ScreenPtr pScreen, Bool enable)
76
WindowPtr pWin = pScreen->root;
78
Bool WasViewable = (Bool)(pWin->viewable);
79
Bool anyMarked = FALSE;
85
for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib)
87
(void) (*pScreen->MarkOverlappedWindows)(pChild,
91
(*pScreen->MarkWindow) (pWin);
97
RegionPtr borderVisible;
99
borderVisible = REGION_CREATE(pScreen, NullBox, 1);
100
REGION_SUBTRACT(pScreen, borderVisible,
101
&pWin->borderClip, &pWin->winSize);
102
pWin->valdata->before.borderVisible = borderVisible;
104
pWin->valdata->before.resized = TRUE;
109
* Use REGION_BREAK to avoid optimizations in ValidateTree
110
* that assume the root borderClip can't change well, normally
117
box.x2 = pScreen->width;
118
box.y2 = pScreen->height;
119
REGION_INIT (pScreen, &pWin->winSize, &box, 1);
120
REGION_INIT (pScreen, &pWin->borderSize, &box, 1);
122
REGION_RESET(pScreen, &pWin->borderClip, &box);
123
pWin->drawable.width = pScreen->width;
124
pWin->drawable.height = pScreen->height;
125
REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
129
REGION_EMPTY(pScreen, &pWin->borderClip);
130
REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList);
133
ResizeChildrenWinSize (pWin, 0, 0, 0, 0);
137
if (pWin->firstChild)
139
anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin->firstChild,
145
(*pScreen->MarkWindow) (pWin);
151
(*pScreen->ValidateTree)(pWin, NullWindow, VTOther);
157
(*pScreen->HandleExposures)(pWin);
158
if (anyMarked && pScreen->PostValidateTree)
159
(*pScreen->PostValidateTree)(pWin, NullWindow, VTOther);
162
WindowsRestructured ();
178
78
WindowPtr pRoot = pScreen->root;
180
80
// Prevent screen updates while we change things around
181
xf86SetRootClip(pScreen, FALSE);
81
SetRootClip(pScreen, FALSE);
183
83
/* Update the screen size as requested */
184
84
pScreenInfo->dwWidth = width;
205
105
// does this emit a ConfigureNotify??
207
107
// Restore the ability to update screen, now with new dimensions
208
xf86SetRootClip(pScreen, TRUE);
108
SetRootClip(pScreen, TRUE);
210
110
// and arrange for it to be repainted
211
111
miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND);