return TRUE;
}
-/* from hw/xfree86/common/xf86Helper.c */
-
-#include "mivalidate.h"
-static void
-xf86SetRootClip(ScreenPtr pScreen, Bool enable)
-{
- WindowPtr pWin = pScreen->root;
- WindowPtr pChild;
- Bool WasViewable = (Bool) (pWin->viewable);
- Bool anyMarked = FALSE;
- WindowPtr pLayerWin;
- BoxRec box;
-
- if (WasViewable) {
- for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) {
- (void) (*pScreen->MarkOverlappedWindows) (pChild,
- pChild, &pLayerWin);
- }
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- if (pWin->valdata) {
- if (HasBorder(pWin)) {
- RegionPtr borderVisible;
-
- borderVisible = RegionCreate(NullBox, 1);
- RegionSubtract(borderVisible,
- &pWin->borderClip, &pWin->winSize);
- pWin->valdata->before.borderVisible = borderVisible;
- }
- pWin->valdata->before.resized = TRUE;
- }
- }
-
- /*
- * Use RegionBreak to avoid optimizations in ValidateTree
- * that assume the root borderClip can't change well, normally
- * it doesn't...)
- */
- if (enable) {
- box.x1 = 0;
- box.y1 = 0;
- box.x2 = pScreen->width;
- box.y2 = pScreen->height;
- RegionInit(&pWin->winSize, &box, 1);
- RegionInit(&pWin->borderSize, &box, 1);
- if (WasViewable)
- RegionReset(&pWin->borderClip, &box);
- pWin->drawable.width = pScreen->width;
- pWin->drawable.height = pScreen->height;
- RegionBreak(&pWin->clipList);
- }
- else {
- RegionEmpty(&pWin->borderClip);
- RegionBreak(&pWin->clipList);
- }
-
- ResizeChildrenWinSize(pWin, 0, 0, 0, 0);
-
- if (WasViewable) {
-
- if (pWin->firstChild) {
- anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild,
- pWin->firstChild,
- (WindowPtr *) NULL);
- }
- else {
- (*pScreen->MarkWindow) (pWin);
- anyMarked = TRUE;
- }
-
- if (anyMarked)
- (*pScreen->ValidateTree) (pWin, NullWindow, VTOther);
- }
-
- if (WasViewable) {
- if (anyMarked)
- (*pScreen->HandleExposures) (pWin);
-
- if (anyMarked && pScreen->PostValidateTree)
- (*pScreen->PostValidateTree) (pWin, NullWindow, VTOther);
- }
- if (pWin->realized)
- WindowsRestructured();
- FlushAllOutput();
-}
-
static Bool vncRandRCrtcSet(ScreenPtr pScreen, RRCrtcPtr crtc, RRModePtr mode,
int x, int y, Rotation rotation, int num_outputs,
RROutputPtr * outputs);
int oldwidth, oldheight, oldmmWidth, oldmmHeight;
/* Prevent updates while we fiddle */
- xf86SetRootClip(pScreen, FALSE);
+ SetRootClip(pScreen, ROOT_CLIP_NONE);
/* Store current state in case we fail */
oldwidth = pScreen->width;
pScreen->mmWidth = oldmmWidth;
pScreen->mmHeight = oldmmHeight;
- xf86SetRootClip(pScreen, TRUE);
+ SetRootClip(pScreen, ROOT_CLIP_FULL);
return FALSE;
}
pScreen->mmWidth = oldmmWidth;
pScreen->mmHeight = oldmmHeight;
- xf86SetRootClip(pScreen, TRUE);
+ SetRootClip(pScreen, ROOT_CLIP_FULL);
return FALSE;
}
vncFbstride[pScreen->myNum] = fb.paddedWidth;
/* Restore ability to update screen, now with new dimensions */
- xf86SetRootClip(pScreen, TRUE);
+ SetRootClip(pScreen, ROOT_CLIP_FULL);
/*
* Let RandR know we changed something (it doesn't assume that