Merge remote-tracking branch 'ajax/mi-cleanup'
This commit is contained in:
commit
6622f0cb17
|
@ -1193,9 +1193,8 @@ PanoramiXCopyArea(ClientPtr client)
|
|||
Bool overlap;
|
||||
|
||||
RegionValidate(&totalReg, &overlap);
|
||||
(*pDst->pScreen->SendGraphicsExpose) (client, &totalReg,
|
||||
stuff->dstDrawable,
|
||||
X_CopyArea, 0);
|
||||
SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
|
||||
X_CopyArea, 0);
|
||||
RegionUninit(&totalReg);
|
||||
}
|
||||
}
|
||||
|
@ -1306,9 +1305,8 @@ PanoramiXCopyPlane(ClientPtr client)
|
|||
Bool overlap;
|
||||
|
||||
RegionValidate(&totalReg, &overlap);
|
||||
(*pdstDraw->pScreen->SendGraphicsExpose) (client, &totalReg,
|
||||
stuff->dstDrawable,
|
||||
X_CopyPlane, 0);
|
||||
SendGraphicsExpose(client, &totalReg, stuff->dstDrawable,
|
||||
X_CopyPlane, 0);
|
||||
RegionUninit(&totalReg);
|
||||
}
|
||||
|
||||
|
|
|
@ -594,9 +594,6 @@ CompositeExtensionInit(void)
|
|||
return;
|
||||
CompositeReqCode = (CARD8) extEntry->base;
|
||||
|
||||
miRegisterRedirectBorderClipProc(compSetRedirectBorderClip,
|
||||
compGetRedirectBorderClip);
|
||||
|
||||
/* Initialization succeeded */
|
||||
noCompositeExtension = FALSE;
|
||||
}
|
||||
|
|
|
@ -119,12 +119,12 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
|||
pScreen->backingStoreSupport != NotUseful) {
|
||||
if (pWin->backingStore != NotUseful && !pWin->backStorage) {
|
||||
compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
|
||||
pWin->backStorage = (void *) (intptr_t) 1;
|
||||
pWin->backStorage = TRUE;
|
||||
}
|
||||
else if (pWin->backingStore == NotUseful && pWin->backStorage) {
|
||||
compUnredirectWindow(serverClient, pWin,
|
||||
CompositeRedirectAutomatic);
|
||||
pWin->backStorage = NULL;
|
||||
pWin->backStorage = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1597,6 +1597,52 @@ ProcClearToBackground(ClientPtr client)
|
|||
return Success;
|
||||
}
|
||||
|
||||
/* send GraphicsExpose events, or a NoExpose event, based on the region */
|
||||
void
|
||||
SendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
|
||||
int major, int minor)
|
||||
{
|
||||
if (pRgn && !RegionNil(pRgn)) {
|
||||
xEvent *pEvent;
|
||||
xEvent *pe;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int numRects;
|
||||
|
||||
numRects = RegionNumRects(pRgn);
|
||||
pBox = RegionRects(pRgn);
|
||||
if (!(pEvent = calloc(numRects, sizeof(xEvent))))
|
||||
return;
|
||||
pe = pEvent;
|
||||
|
||||
for (i = 1; i <= numRects; i++, pe++, pBox++) {
|
||||
pe->u.u.type = GraphicsExpose;
|
||||
pe->u.graphicsExposure.drawable = drawable;
|
||||
pe->u.graphicsExposure.x = pBox->x1;
|
||||
pe->u.graphicsExposure.y = pBox->y1;
|
||||
pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
|
||||
pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
|
||||
pe->u.graphicsExposure.count = numRects - i;
|
||||
pe->u.graphicsExposure.majorEvent = major;
|
||||
pe->u.graphicsExposure.minorEvent = minor;
|
||||
}
|
||||
/* GraphicsExpose is a "critical event", which TryClientEvents
|
||||
* handles specially. */
|
||||
TryClientEvents(client, NULL, pEvent, numRects,
|
||||
(Mask) 0, NoEventMask, NullGrab);
|
||||
free(pEvent);
|
||||
}
|
||||
else {
|
||||
xEvent event = {
|
||||
.u.noExposure.drawable = drawable,
|
||||
.u.noExposure.majorEvent = major,
|
||||
.u.noExposure.minorEvent = minor
|
||||
};
|
||||
event.u.u.type = NoExpose;
|
||||
WriteEventsToClient(client, 1, &event);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ProcCopyArea(ClientPtr client)
|
||||
{
|
||||
|
@ -1628,8 +1674,7 @@ ProcCopyArea(ClientPtr client)
|
|||
stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY);
|
||||
if (pGC->graphicsExposures) {
|
||||
(*pDst->pScreen->SendGraphicsExpose)
|
||||
(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
|
||||
SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyArea, 0);
|
||||
if (pRgn)
|
||||
RegionDestroy(pRgn);
|
||||
}
|
||||
|
@ -1676,8 +1721,7 @@ ProcCopyPlane(ClientPtr client)
|
|||
stuff->srcY, stuff->width, stuff->height,
|
||||
stuff->dstX, stuff->dstY, stuff->bitPlane);
|
||||
if (pGC->graphicsExposures) {
|
||||
(*pdstDraw->pScreen->SendGraphicsExpose)
|
||||
(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
|
||||
SendGraphicsExpose(client, pRgn, stuff->dstDrawable, X_CopyPlane, 0);
|
||||
if (pRgn)
|
||||
RegionDestroy(pRgn);
|
||||
}
|
||||
|
|
73
dix/window.c
73
dix/window.c
|
@ -357,13 +357,12 @@ SetWindowToDefaults(WindowPtr pWin)
|
|||
pWin->firstChild = NullWindow;
|
||||
pWin->lastChild = NullWindow;
|
||||
|
||||
pWin->valdata = (ValidatePtr) NULL;
|
||||
pWin->optional = (WindowOptPtr) NULL;
|
||||
pWin->valdata = NULL;
|
||||
pWin->optional = NULL;
|
||||
pWin->cursorIsNone = TRUE;
|
||||
|
||||
pWin->backingStore = NotUseful;
|
||||
pWin->DIXsaveUnder = FALSE;
|
||||
pWin->backStorage = (void *) NULL;
|
||||
pWin->backStorage = 0;
|
||||
|
||||
pWin->mapped = FALSE; /* off */
|
||||
pWin->realized = FALSE; /* off */
|
||||
|
@ -1551,7 +1550,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib)
|
|||
if (pWin->prevSib)
|
||||
pWin->prevSib->nextSib = pWin->nextSib;
|
||||
pWin->nextSib = pParent->firstChild;
|
||||
pWin->prevSib = (WindowPtr) NULL;
|
||||
pWin->prevSib = NULL;
|
||||
pNextSib->prevSib = pWin;
|
||||
pParent->firstChild = pWin;
|
||||
}
|
||||
|
@ -1813,8 +1812,6 @@ ResizeChildrenWinSize(WindowPtr pWin, int dx, int dy, int dw, int dh)
|
|||
|
||||
#define ChangeMask ((Mask)(CWX | CWY | CWWidth | CWHeight))
|
||||
|
||||
#define IllegalInputOnlyConfigureMask (CWBorderWidth)
|
||||
|
||||
/*
|
||||
* IsSiblingAboveMe
|
||||
* returns Above if pSib above pMe in stack or Below otherwise
|
||||
|
@ -1848,7 +1845,7 @@ WindowExtents(WindowPtr pWin, BoxPtr pBox)
|
|||
return pBox;
|
||||
}
|
||||
|
||||
#define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL)
|
||||
#define IS_SHAPED(pWin) (wBoundingShape (pWin) != NULL)
|
||||
|
||||
static RegionPtr
|
||||
MakeBoundingRegion(WindowPtr pWin, BoxPtr pBox)
|
||||
|
@ -1954,7 +1951,7 @@ WhereDoIGoInTheStack(WindowPtr pWin,
|
|||
WindowPtr pHead, pFirst;
|
||||
|
||||
if ((pWin == pWin->parent->firstChild) && (pWin == pWin->parent->lastChild))
|
||||
return ((WindowPtr) NULL);
|
||||
return NULL;
|
||||
pHead = RealChildHead(pWin->parent);
|
||||
pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild;
|
||||
box.x1 = x;
|
||||
|
@ -2062,10 +2059,10 @@ ReflectStackChange(WindowPtr pWin, WindowPtr pSib, VTKind kind)
|
|||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstChange, kind);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pWin->drawable.pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||
kind);
|
||||
}
|
||||
if (anyMarked && pWin->drawable.pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||
kind);
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured();
|
||||
|
@ -2092,8 +2089,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client)
|
|||
h = pWin->drawable.height, bw = pWin->borderWidth;
|
||||
int rc, action, smode = Above;
|
||||
|
||||
if ((pWin->drawable.class == InputOnly) &&
|
||||
(mask & IllegalInputOnlyConfigureMask))
|
||||
if ((pWin->drawable.class == InputOnly) && (mask & CWBorderWidth))
|
||||
return BadMatch;
|
||||
|
||||
if ((mask & CWSibling) && !(mask & CWStackMode))
|
||||
|
@ -2580,10 +2576,10 @@ MapWindow(WindowPtr pWin, ClientPtr client)
|
|||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTMap);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||
VTMap);
|
||||
}
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||
VTMap);
|
||||
}
|
||||
WindowsRestructured();
|
||||
}
|
||||
|
@ -2601,7 +2597,7 @@ MapWindow(WindowPtr pWin, ClientPtr client)
|
|||
(*pScreen->PostValidateTree) (NullWindow, pWin, VTMap);
|
||||
RegionNull(&temp);
|
||||
RegionCopy(&temp, &pWin->clipList);
|
||||
(*pScreen->WindowExposures) (pWin, &temp, NullRegion);
|
||||
(*pScreen->WindowExposures) (pWin, &temp);
|
||||
RegionUninit(&temp);
|
||||
}
|
||||
|
||||
|
@ -2645,8 +2641,7 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
|
|||
RealizeTree(pWin);
|
||||
if (pWin->viewable) {
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin,
|
||||
(WindowPtr
|
||||
*) NULL);
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2656,17 +2651,16 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
|
|||
pLayerWin = (*pScreen->GetLayerWindow) (pParent);
|
||||
if (pLayerWin->parent != pParent) {
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pLayerWin,
|
||||
pLayerWin,
|
||||
(WindowPtr *) NULL);
|
||||
pLayerWin, NULL);
|
||||
pFirstMapped = pLayerWin;
|
||||
}
|
||||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pFirstMapped, VTMap);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped,
|
||||
VTMap);
|
||||
}
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstMapped,
|
||||
VTMap);
|
||||
WindowsRestructured();
|
||||
}
|
||||
}
|
||||
|
@ -2760,9 +2754,9 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure)
|
|||
if (!fromConfigure) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
||||
}
|
||||
if (!fromConfigure && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pWin, VTUnmap);
|
||||
}
|
||||
if (wasRealized && !fromConfigure) {
|
||||
WindowsRestructured();
|
||||
|
@ -2807,8 +2801,6 @@ UnmapSubwindows(WindowPtr pWin)
|
|||
pChild->mapped = FALSE;
|
||||
if (pChild->realized)
|
||||
UnrealizeTree(pChild, FALSE);
|
||||
if (wasViewable) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (wasViewable) {
|
||||
|
@ -2818,8 +2810,7 @@ UnmapSubwindows(WindowPtr pWin)
|
|||
else {
|
||||
WindowPtr ptmp;
|
||||
|
||||
(*pScreen->MarkOverlappedWindows) (pWin, pLayerWin,
|
||||
(WindowPtr *) NULL);
|
||||
(*pScreen->MarkOverlappedWindows) (pWin, pLayerWin, NULL);
|
||||
(*pScreen->MarkWindow) (pLayerWin->parent);
|
||||
|
||||
/* Windows between pWin and pLayerWin may not have been marked */
|
||||
|
@ -2833,9 +2824,10 @@ UnmapSubwindows(WindowPtr pWin)
|
|||
}
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pHead, VTUnmap);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pHead,
|
||||
VTUnmap);
|
||||
}
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pHead, VTUnmap);
|
||||
}
|
||||
if (wasRealized) {
|
||||
WindowsRestructured();
|
||||
|
@ -2878,7 +2870,7 @@ HandleSaveSet(ClientPtr client)
|
|||
}
|
||||
free(client->saveSet);
|
||||
client->numSaved = 0;
|
||||
client->saveSet = (SaveSetElt *) NULL;
|
||||
client->saveSet = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3594,22 +3586,19 @@ SetRootClip(ScreenPtr pScreen, Bool enable)
|
|||
if (pWin->firstChild) {
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin->firstChild,
|
||||
pWin->firstChild,
|
||||
(WindowPtr *) NULL);
|
||||
NULL);
|
||||
}
|
||||
else {
|
||||
(*pScreen->MarkWindow) (pWin);
|
||||
anyMarked = TRUE;
|
||||
}
|
||||
|
||||
if (anyMarked)
|
||||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pWin, NullWindow, VTOther);
|
||||
}
|
||||
|
||||
if (WasViewable) {
|
||||
if (anyMarked)
|
||||
(*pScreen->HandleExposures) (pWin);
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pWin, NullWindow, VTOther);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pWin, NullWindow, VTOther);
|
||||
}
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured();
|
||||
|
|
4
fb/fb.h
4
fb/fb.h
|
@ -1621,13 +1621,13 @@ extern _X_EXPORT Bool
|
|||
fbDestroyWindow(WindowPtr pWin);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
fbMapWindow(WindowPtr pWindow);
|
||||
fbRealizeWindow(WindowPtr pWindow);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
fbPositionWindow(WindowPtr pWin, int x, int y);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
fbUnmapWindow(WindowPtr pWindow);
|
||||
fbUnrealizeWindow(WindowPtr pWindow);
|
||||
|
||||
extern _X_EXPORT void
|
||||
|
||||
|
|
|
@ -271,5 +271,5 @@ fbCopyPlane(DrawablePtr pSrcDrawable,
|
|||
else
|
||||
return miHandleExposures(pSrcDrawable, pDstDrawable, pGC,
|
||||
xIn, yIn,
|
||||
widthSrc, heightSrc, xOut, yOut, bitplane);
|
||||
widthSrc, heightSrc, xOut, yOut);
|
||||
}
|
||||
|
|
|
@ -240,12 +240,11 @@ fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
|||
}
|
||||
|
||||
void
|
||||
fbOverlayWindowExposures(WindowPtr pWin,
|
||||
RegionPtr prgn, RegionPtr other_exposed)
|
||||
fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||
{
|
||||
fbOverlayUpdateLayerRegion(pWin->drawable.pScreen,
|
||||
fbOverlayWindowLayer(pWin), prgn);
|
||||
miWindowExposures(pWin, prgn, other_exposed);
|
||||
miWindowExposures(pWin, prgn);
|
||||
}
|
||||
|
||||
Bool
|
||||
|
|
|
@ -82,9 +82,7 @@ extern _X_EXPORT void
|
|||
fbOverlayCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||
|
||||
extern _X_EXPORT void
|
||||
|
||||
fbOverlayWindowExposures(WindowPtr pWin,
|
||||
RegionPtr prgn, RegionPtr other_exposed);
|
||||
fbOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn);
|
||||
|
||||
extern _X_EXPORT Bool
|
||||
|
||||
|
|
|
@ -110,8 +110,8 @@ fbSetupScreen(ScreenPtr pScreen, void *pbits, /* pointer to screen bitmap */
|
|||
pScreen->DestroyWindow = fbDestroyWindow;
|
||||
pScreen->PositionWindow = fbPositionWindow;
|
||||
pScreen->ChangeWindowAttributes = fbChangeWindowAttributes;
|
||||
pScreen->RealizeWindow = fbMapWindow;
|
||||
pScreen->UnrealizeWindow = fbUnmapWindow;
|
||||
pScreen->RealizeWindow = fbRealizeWindow;
|
||||
pScreen->UnrealizeWindow = fbUnrealizeWindow;
|
||||
pScreen->CopyWindow = fbCopyWindow;
|
||||
pScreen->CreatePixmap = fbCreatePixmap;
|
||||
pScreen->DestroyPixmap = fbDestroyPixmap;
|
||||
|
|
|
@ -46,7 +46,7 @@ fbDestroyWindow(WindowPtr pWin)
|
|||
}
|
||||
|
||||
Bool
|
||||
fbMapWindow(WindowPtr pWindow)
|
||||
fbRealizeWindow(WindowPtr pWindow)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ fbPositionWindow(WindowPtr pWin, int x, int y)
|
|||
}
|
||||
|
||||
Bool
|
||||
fbUnmapWindow(WindowPtr pWindow)
|
||||
fbUnrealizeWindow(WindowPtr pWindow)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
#define fbInstallColormap wfbInstallColormap
|
||||
#define fbLaneTable wfbLaneTable
|
||||
#define fbListInstalledColormaps wfbListInstalledColormaps
|
||||
#define fbMapWindow wfbMapWindow
|
||||
#define FbMergeRopBits wFbMergeRopBits
|
||||
#define fbOddStipple wfbOddStipple
|
||||
#define fbOddTile wfbOddTile
|
||||
|
@ -134,6 +133,7 @@
|
|||
#define fbQueryBestSize wfbQueryBestSize
|
||||
#define fbRasterizeTrapezoid wfbRasterizeTrapezoid
|
||||
#define fbRealizeFont wfbRealizeFont
|
||||
#define fbRealizeWindow wfbRealizeWindow
|
||||
#define fbReduceRasterOp wfbReduceRasterOp
|
||||
#define fbReplicatePixel wfbReplicatePixel
|
||||
#define fbResolveColor wfbResolveColor
|
||||
|
@ -160,7 +160,7 @@
|
|||
#define fbTrapezoids wfbTrapezoids
|
||||
#define fbTriangles wfbTriangles
|
||||
#define fbUninstallColormap wfbUninstallColormap
|
||||
#define fbUnmapWindow wfbUnmapWindow
|
||||
#define fbUnrealizeWindow wfbUnrealizeWindow
|
||||
#define fbUnrealizeFont wfbUnrealizeFont
|
||||
#define fbValidateGC wfbValidateGC
|
||||
#define fbWinPrivateKeyRec wfbWinPrivateKeyRec
|
||||
|
|
|
@ -677,8 +677,7 @@ glamor_copy_plane(DrawablePtr src, DrawablePtr dst, GCPtr gc,
|
|||
{
|
||||
if ((bitplane & FbFullMask(src->depth)) == 0)
|
||||
return miHandleExposures(src, dst, gc,
|
||||
srcx, srcy, width, height, dstx, dsty,
|
||||
bitplane);
|
||||
srcx, srcy, width, height, dstx, dsty);
|
||||
return miDoCopy(src, dst, gc,
|
||||
srcx, srcy, width, height,
|
||||
dstx, dsty, glamor_copy, bitplane, NULL);
|
||||
|
|
|
@ -179,7 +179,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||
|
||||
if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst))
|
||||
return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h,
|
||||
dstx, dsty, 0L);
|
||||
dstx, dsty);
|
||||
|
||||
DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw);
|
||||
DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw);
|
||||
|
@ -188,7 +188,7 @@ dmxCopyArea(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||
srcx, srcy, w, h, dstx, dsty);
|
||||
dmxSync(dmxScreen, FALSE);
|
||||
|
||||
return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0L);
|
||||
return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
|
||||
}
|
||||
|
||||
/** Copy plane number \a bitPlane from \a pSrc drawable to \a pDst
|
||||
|
@ -206,7 +206,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||
|
||||
if (DMX_GCOPS_OFFSCREEN(pSrc) || DMX_GCOPS_OFFSCREEN(pDst))
|
||||
return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height,
|
||||
dstx, dsty, bitPlane);
|
||||
dstx, dsty);
|
||||
|
||||
DMX_GCOPS_SET_DRAWABLE(pSrc, srcDraw);
|
||||
DMX_GCOPS_SET_DRAWABLE(pDst, dstDraw);
|
||||
|
@ -216,7 +216,7 @@ dmxCopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
|
|||
dmxSync(dmxScreen, FALSE);
|
||||
|
||||
return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, width, height,
|
||||
dstx, dsty, bitPlane);
|
||||
dstx, dsty);
|
||||
}
|
||||
|
||||
/** Render list of points, \a pptInit in \a pDrawable on the back-end
|
||||
|
|
|
@ -772,7 +772,7 @@ dmxWindowExposurePredicate(Display * dpy, XEvent * ev, XPointer ptr)
|
|||
* in DMX, the events that are generated by the back-end server are
|
||||
* redundant, so we eat them here. */
|
||||
void
|
||||
dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed)
|
||||
dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn)
|
||||
{
|
||||
ScreenPtr pScreen = pWindow->drawable.pScreen;
|
||||
DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum];
|
||||
|
@ -799,7 +799,7 @@ dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn, RegionPtr other_exposed)
|
|||
|
||||
#if 1
|
||||
if (pScreen->WindowExposures)
|
||||
pScreen->WindowExposures(pWindow, prgn, other_exposed);
|
||||
pScreen->WindowExposures(pWindow, prgn);
|
||||
#endif
|
||||
DMX_WRAP(WindowExposures, dmxWindowExposures, dmxScreen, pScreen);
|
||||
}
|
||||
|
|
|
@ -73,8 +73,7 @@ extern Bool dmxChangeWindowAttributes(WindowPtr pWindow, unsigned long mask);
|
|||
extern Bool dmxRealizeWindow(WindowPtr pWindow);
|
||||
extern Bool dmxUnrealizeWindow(WindowPtr pWindow);
|
||||
extern void dmxRestackWindow(WindowPtr pWindow, WindowPtr pOldNextSib);
|
||||
extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn,
|
||||
RegionPtr other_exposed);
|
||||
extern void dmxWindowExposures(WindowPtr pWindow, RegionPtr prgn);
|
||||
extern void dmxCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg,
|
||||
RegionPtr prgnSrc);
|
||||
|
||||
|
|
|
@ -878,7 +878,7 @@ ephyrExposePairedWindow(int a_remote)
|
|||
screen = pair->local->drawable.pScreen;
|
||||
RegionNull(®);
|
||||
RegionCopy(®, &pair->local->clipList);
|
||||
screen->WindowExposures(pair->local, ®, NullRegion);
|
||||
screen->WindowExposures(pair->local, ®);
|
||||
RegionUninit(®);
|
||||
}
|
||||
#endif /* XF86DRI */
|
||||
|
|
|
@ -909,10 +909,6 @@ KdScreenInit(ScreenPtr pScreen, int argc, char **argv)
|
|||
if (!(*card->cfuncs->finishInitScreen) (pScreen))
|
||||
return FALSE;
|
||||
|
||||
#if 0
|
||||
fbInitValidateTree(pScreen);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Wrap CloseScreen, the order now is:
|
||||
* KdCloseScreen
|
||||
|
|
|
@ -86,7 +86,7 @@ static int KdXVQueryImageAttributes(XvPortPtr, XvImagePtr,
|
|||
/* ScreenRec fields */
|
||||
|
||||
static Bool KdXVDestroyWindow(WindowPtr pWin);
|
||||
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
|
||||
static void KdXVWindowExposures(WindowPtr pWin, RegionPtr r1);
|
||||
static void KdXVClipNotify(WindowPtr pWin, int dx, int dy);
|
||||
static Bool KdXVCloseScreen(ScreenPtr);
|
||||
|
||||
|
@ -822,7 +822,7 @@ KdXVDestroyWindow(WindowPtr pWin)
|
|||
}
|
||||
|
||||
static void
|
||||
KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
|
||||
KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
KdXVScreenPtr ScreenPriv = GET_KDXV_SCREEN(pScreen);
|
||||
|
@ -834,7 +834,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
|
|||
AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
|
||||
|
||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||
(*pScreen->WindowExposures) (pWin, reg1, reg2);
|
||||
(*pScreen->WindowExposures) (pWin, reg1);
|
||||
pScreen->WindowExposures = KdXVWindowExposures;
|
||||
|
||||
/* filter out XClearWindow/Area */
|
||||
|
|
|
@ -84,7 +84,7 @@ static int xf86XVQueryImageAttributes(XvPortPtr, XvImagePtr,
|
|||
/* ScreenRec fields */
|
||||
|
||||
static Bool xf86XVDestroyWindow(WindowPtr pWin);
|
||||
static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1, RegionPtr r2);
|
||||
static void xf86XVWindowExposures(WindowPtr pWin, RegionPtr r1);
|
||||
static void xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin,
|
||||
VTKind kind);
|
||||
static void xf86XVClipNotify(WindowPtr pWin, int dx, int dy);
|
||||
|
@ -1048,7 +1048,7 @@ xf86XVPostValidateTree(WindowPtr pWin, WindowPtr pLayerWin, VTKind kind)
|
|||
}
|
||||
|
||||
static void
|
||||
xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
|
||||
xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
|
||||
|
@ -1059,7 +1059,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
|
|||
AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1));
|
||||
|
||||
pScreen->WindowExposures = ScreenPriv->WindowExposures;
|
||||
(*pScreen->WindowExposures) (pWin, reg1, reg2);
|
||||
(*pScreen->WindowExposures) (pWin, reg1);
|
||||
pScreen->WindowExposures = xf86XVWindowExposures;
|
||||
|
||||
/* filter out XClearWindow/Area */
|
||||
|
|
|
@ -1828,7 +1828,7 @@ DRIGetContextStore(DRIContextPrivPtr context)
|
|||
}
|
||||
|
||||
void
|
||||
DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg)
|
||||
DRIWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||
|
@ -1846,7 +1846,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg)
|
|||
pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures;
|
||||
|
||||
/* call lower layers */
|
||||
(*pScreen->WindowExposures) (pWin, prgn, bsreg);
|
||||
(*pScreen->WindowExposures) (pWin, prgn);
|
||||
|
||||
/* rewrap */
|
||||
pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures;
|
||||
|
|
|
@ -280,8 +280,7 @@ extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx);
|
|||
|
||||
extern _X_EXPORT void *DRIGetContextStore(DRIContextPrivPtr context);
|
||||
|
||||
extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin,
|
||||
RegionPtr prgn, RegionPtr bsreg);
|
||||
extern _X_EXPORT void DRIWindowExposures(WindowPtr pWin, RegionPtr prgn);
|
||||
|
||||
extern _X_EXPORT Bool DRIDestroyWindow(WindowPtr pWin);
|
||||
|
||||
|
|
|
@ -386,7 +386,7 @@ xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr)
|
|||
}
|
||||
|
||||
void
|
||||
xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
|
||||
xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn)
|
||||
{
|
||||
XEvent event;
|
||||
Window window;
|
||||
|
@ -410,7 +410,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed)
|
|||
XPutBackEvent(xnestDisplay, &event);
|
||||
}
|
||||
|
||||
miWindowExposures(pWin, pRgn, other_exposed);
|
||||
miWindowExposures(pWin, pRgn);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -66,8 +66,7 @@ Bool xnestRealizeWindow(WindowPtr pWin);
|
|||
Bool xnestUnrealizeWindow(WindowPtr pWin);
|
||||
void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion);
|
||||
void xnestClipNotify(WindowPtr pWin, int dx, int dy);
|
||||
void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn,
|
||||
RegionPtr other_exposed);
|
||||
void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn);
|
||||
void xnestSetShape(WindowPtr pWin, int kind);
|
||||
void xnestShapeWindow(WindowPtr pWin);
|
||||
|
||||
|
|
|
@ -138,9 +138,6 @@ DRIFinishScreenInit(ScreenPtr pScreen)
|
|||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||
|
||||
/* Wrap DRI support */
|
||||
pDRIPriv->wrap.WindowExposures = pScreen->WindowExposures;
|
||||
pScreen->WindowExposures = DRIWindowExposures;
|
||||
|
||||
pDRIPriv->wrap.CopyWindow = pScreen->CopyWindow;
|
||||
pScreen->CopyWindow = DRICopyWindow;
|
||||
|
||||
|
@ -576,24 +573,6 @@ DRIDrawablePrivDelete(void *pResource, XID id)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg)
|
||||
{
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
|
||||
DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin);
|
||||
|
||||
if (pDRIDrawablePriv) {
|
||||
/* FIXME: something? */
|
||||
}
|
||||
|
||||
pScreen->WindowExposures = pDRIPriv->wrap.WindowExposures;
|
||||
|
||||
(*pScreen->WindowExposures)(pWin, prgn, bsreg);
|
||||
|
||||
pScreen->WindowExposures = DRIWindowExposures;
|
||||
}
|
||||
|
||||
void
|
||||
DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,6 @@ typedef void (*ClipNotifyPtr)(WindowPtr, int, int);
|
|||
* overridden by the driver in its [driver]DRIScreenInit function.
|
||||
*/
|
||||
typedef struct {
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
CopyWindowProcPtr CopyWindow;
|
||||
ClipNotifyProcPtr ClipNotify;
|
||||
} DRIWrappedFuncsRec, *DRIWrappedFuncsPtr;
|
||||
|
@ -108,9 +107,6 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
|||
extern void
|
||||
DRIClipNotify(WindowPtr pWin, int dx, int dy);
|
||||
|
||||
extern void
|
||||
DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg);
|
||||
|
||||
extern void
|
||||
DRISurfaceNotify(xp_surface_id id, int kind);
|
||||
|
||||
|
|
|
@ -254,6 +254,12 @@ extern _X_EXPORT void ClientWakeup(ClientPtr /*client */ );
|
|||
|
||||
extern _X_EXPORT Bool ClientIsAsleep(ClientPtr /*client */ );
|
||||
|
||||
extern _X_EXPORT void SendGraphicsExpose(ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */);
|
||||
|
||||
/* atom.c */
|
||||
|
||||
extern _X_EXPORT Atom MakeAtom(const char * /*string */ ,
|
||||
|
|
|
@ -155,8 +155,7 @@ typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ ,
|
|||
VTKind /*kind */ );
|
||||
|
||||
typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ ,
|
||||
RegionPtr /*prgn */ ,
|
||||
RegionPtr /*other_exposed */ );
|
||||
RegionPtr /*prgn */);
|
||||
|
||||
typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ ,
|
||||
DDXPointRec /*ptOldOrg */ ,
|
||||
|
@ -253,12 +252,6 @@ typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
|
|||
|
||||
typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
|
||||
|
||||
typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */ );
|
||||
|
||||
typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr pScreen,
|
||||
void *pTimeout,
|
||||
void *pReadmask);
|
||||
|
@ -541,7 +534,6 @@ typedef struct _Screen {
|
|||
/* Region procedures */
|
||||
|
||||
BitmapToRegionProcPtr BitmapToRegion;
|
||||
SendGraphicsExposeProcPtr SendGraphicsExpose;
|
||||
|
||||
/* os layer procedures */
|
||||
|
||||
|
|
|
@ -144,14 +144,13 @@ typedef struct _Window {
|
|||
Mask eventMask; /* mask from the creating client */
|
||||
PixUnion background;
|
||||
PixUnion border;
|
||||
void *backStorage; /* null when BS disabled */
|
||||
WindowOptPtr optional;
|
||||
unsigned backgroundState:2; /* None, Relative, Pixel, Pixmap */
|
||||
unsigned borderIsPixel:1;
|
||||
unsigned cursorIsNone:1; /* else real cursor (might inherit) */
|
||||
unsigned backingStore:2;
|
||||
unsigned backStorage:1; /* if bs is allocated */
|
||||
unsigned saveUnder:1;
|
||||
unsigned DIXsaveUnder:1;
|
||||
unsigned bitGravity:4;
|
||||
unsigned winGravity:4;
|
||||
unsigned overrideRedirect:1;
|
||||
|
|
37
mi/mi.h
37
mi/mi.h
|
@ -229,15 +229,7 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ ,
|
|||
int /*width */ ,
|
||||
int /*height */ ,
|
||||
int /*dstx */ ,
|
||||
int /*dsty */ ,
|
||||
unsigned long /*plane */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miSendGraphicsExpose(ClientPtr /*client */ ,
|
||||
RegionPtr /*pRgn */ ,
|
||||
XID /*drawable */ ,
|
||||
int /*major */ ,
|
||||
int /*minor */
|
||||
int /*dsty */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
|
||||
|
@ -247,9 +239,7 @@ extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ ,
|
|||
);
|
||||
|
||||
extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ ,
|
||||
RegionPtr /*prgn */ ,
|
||||
RegionPtr /*other_exposed */
|
||||
);
|
||||
RegionPtr /*prgn */);
|
||||
|
||||
extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ ,
|
||||
RegionPtr /*prgn */ ,
|
||||
|
@ -427,17 +417,6 @@ extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ ,
|
|||
int /*y */
|
||||
);
|
||||
|
||||
typedef void
|
||||
(*SetRedirectBorderClipProcPtr) (WindowPtr pWindow, RegionPtr pRegion);
|
||||
|
||||
typedef RegionPtr
|
||||
(*GetRedirectBorderClipProcPtr) (WindowPtr pWindow);
|
||||
|
||||
extern _X_EXPORT void
|
||||
|
||||
miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip,
|
||||
GetRedirectBorderClipProcPtr getBorderClip);
|
||||
|
||||
extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ ,
|
||||
WindowPtr /*pChild */ ,
|
||||
VTKind /*kind */
|
||||
|
@ -491,12 +470,12 @@ extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ ,
|
|||
VTKind /*kind */
|
||||
);
|
||||
|
||||
extern _X_EXPORT void miSlideAndSizeWindow(WindowPtr /*pWin */ ,
|
||||
int /*x */ ,
|
||||
int /*y */ ,
|
||||
unsigned int /*w */ ,
|
||||
unsigned int /*h */ ,
|
||||
WindowPtr /*pSib */
|
||||
extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ ,
|
||||
int /*x */ ,
|
||||
int /*y */ ,
|
||||
unsigned int /*w */ ,
|
||||
unsigned int /*h */ ,
|
||||
WindowPtr /*pSib */
|
||||
);
|
||||
|
||||
extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */
|
||||
|
|
|
@ -242,8 +242,7 @@ miCopyArea(DrawablePtr pSrcDrawable,
|
|||
}
|
||||
}
|
||||
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn,
|
||||
widthSrc, heightSrc, xOut, yOut,
|
||||
(unsigned long) 0);
|
||||
widthSrc, heightSrc, xOut, yOut);
|
||||
if (realSrcClip)
|
||||
RegionDestroy(prgnSrcClip);
|
||||
|
||||
|
@ -579,7 +578,7 @@ miCopyPlane(DrawablePtr pSrcDrawable,
|
|||
}
|
||||
}
|
||||
prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy,
|
||||
width, height, dstx, dsty, bitPlane);
|
||||
width, height, dstx, dsty);
|
||||
RegionDestroy(prgnSrc);
|
||||
return prgnExposed;
|
||||
}
|
||||
|
|
|
@ -304,8 +304,7 @@ miDoCopy(DrawablePtr pSrcDrawable,
|
|||
yIn - pSrcDrawable->y,
|
||||
widthSrc, heightSrc,
|
||||
xOut - pDstDrawable->x,
|
||||
yOut - pDstDrawable->y,
|
||||
(unsigned long) bitPlane);
|
||||
yOut - pDstDrawable->y);
|
||||
RegionUninit(&rgnDst);
|
||||
if (freeSrcClip)
|
||||
RegionDestroy(prgnSrcClip);
|
||||
|
|
109
mi/miexpose.c
109
mi/miexpose.c
|
@ -116,18 +116,12 @@ NOTE:
|
|||
this should generally be called, even if graphicsExposures is false,
|
||||
because this is where bits get recovered from backing store.
|
||||
|
||||
NOTE:
|
||||
added argument 'plane' is used to indicate how exposures from backing
|
||||
store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea
|
||||
should be used, else a CopyPlane of the indicated plane will be used. The
|
||||
exposing is done by the backing store's GraphicsExpose function, of course.
|
||||
|
||||
*/
|
||||
|
||||
RegionPtr
|
||||
miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
||||
GCPtr pGC, int srcx, int srcy, int width, int height,
|
||||
int dstx, int dsty, unsigned long plane)
|
||||
int dstx, int dsty)
|
||||
{
|
||||
RegionPtr prgnSrcClip; /* drawable-relative source clip */
|
||||
RegionRec rgnSrcRec;
|
||||
|
@ -149,7 +143,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
|||
if (!pGC->graphicsExposures &&
|
||||
(pDstDrawable->type == DRAWABLE_PIXMAP) &&
|
||||
((pSrcDrawable->type == DRAWABLE_PIXMAP) ||
|
||||
(((WindowPtr) pSrcDrawable)->backStorage == NULL)))
|
||||
(((WindowPtr) pSrcDrawable)->backStorage == 0)))
|
||||
return NULL;
|
||||
|
||||
srcBox.x1 = srcx;
|
||||
|
@ -312,53 +306,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
|
|||
}
|
||||
}
|
||||
|
||||
/* send GraphicsExpose events, or a NoExpose event, based on the region */
|
||||
|
||||
void
|
||||
miSendGraphicsExpose(ClientPtr client, RegionPtr pRgn, XID drawable,
|
||||
int major, int minor)
|
||||
{
|
||||
if (pRgn && !RegionNil(pRgn)) {
|
||||
xEvent *pEvent;
|
||||
xEvent *pe;
|
||||
BoxPtr pBox;
|
||||
int i;
|
||||
int numRects;
|
||||
|
||||
numRects = RegionNumRects(pRgn);
|
||||
pBox = RegionRects(pRgn);
|
||||
if (!(pEvent = calloc(numRects, sizeof(xEvent))))
|
||||
return;
|
||||
pe = pEvent;
|
||||
|
||||
for (i = 1; i <= numRects; i++, pe++, pBox++) {
|
||||
pe->u.u.type = GraphicsExpose;
|
||||
pe->u.graphicsExposure.drawable = drawable;
|
||||
pe->u.graphicsExposure.x = pBox->x1;
|
||||
pe->u.graphicsExposure.y = pBox->y1;
|
||||
pe->u.graphicsExposure.width = pBox->x2 - pBox->x1;
|
||||
pe->u.graphicsExposure.height = pBox->y2 - pBox->y1;
|
||||
pe->u.graphicsExposure.count = numRects - i;
|
||||
pe->u.graphicsExposure.majorEvent = major;
|
||||
pe->u.graphicsExposure.minorEvent = minor;
|
||||
}
|
||||
/* GraphicsExpose is a "critical event", which TryClientEvents
|
||||
* handles specially. */
|
||||
TryClientEvents(client, NULL, pEvent, numRects,
|
||||
(Mask) 0, NoEventMask, NullGrab);
|
||||
free(pEvent);
|
||||
}
|
||||
else {
|
||||
xEvent event = {
|
||||
.u.noExposure.drawable = drawable,
|
||||
.u.noExposure.majorEvent = major,
|
||||
.u.noExposure.minorEvent = minor
|
||||
};
|
||||
event.u.u.type = NoExpose;
|
||||
WriteEventsToClient(client, 1, &event);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
|
||||
{
|
||||
|
@ -421,30 +368,15 @@ miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy)
|
|||
}
|
||||
|
||||
void
|
||||
miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
|
||||
miWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||
{
|
||||
RegionPtr exposures = prgn;
|
||||
|
||||
if ((prgn && !RegionNil(prgn)) ||
|
||||
(exposures && !RegionNil(exposures)) || other_exposed) {
|
||||
if (prgn && !RegionNil(prgn)) {
|
||||
RegionRec expRec;
|
||||
int clientInterested;
|
||||
|
||||
/*
|
||||
* Restore from backing-store FIRST.
|
||||
*/
|
||||
clientInterested =
|
||||
int clientInterested =
|
||||
(pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
|
||||
if (other_exposed) {
|
||||
if (exposures) {
|
||||
RegionUnion(other_exposed, exposures, other_exposed);
|
||||
if (exposures != prgn)
|
||||
RegionDestroy(exposures);
|
||||
}
|
||||
exposures = other_exposed;
|
||||
}
|
||||
if (clientInterested && exposures &&
|
||||
(RegionNumRects(exposures) > RECTLIMIT)) {
|
||||
if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
|
||||
/*
|
||||
* If we have LOTS of rectangles, we decide to take the extents
|
||||
* and force an exposure on that. This should require much less
|
||||
|
@ -453,34 +385,21 @@ miWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed)
|
|||
*/
|
||||
BoxRec box;
|
||||
|
||||
box = *RegionExtents(exposures);
|
||||
if (exposures == prgn) {
|
||||
exposures = &expRec;
|
||||
RegionInit(exposures, &box, 1);
|
||||
RegionReset(prgn, &box);
|
||||
}
|
||||
else {
|
||||
RegionReset(exposures, &box);
|
||||
RegionUnion(prgn, prgn, exposures);
|
||||
}
|
||||
box = *RegionExtents(prgn);
|
||||
exposures = &expRec;
|
||||
RegionInit(exposures, &box, 1);
|
||||
RegionReset(prgn, &box);
|
||||
/* miPaintWindow doesn't clip, so we have to */
|
||||
RegionIntersect(prgn, prgn, &pWin->clipList);
|
||||
}
|
||||
if (prgn && !RegionNil(prgn))
|
||||
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||
if (clientInterested && exposures && !RegionNil(exposures))
|
||||
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||
if (clientInterested)
|
||||
miSendExposures(pWin, exposures,
|
||||
pWin->drawable.x, pWin->drawable.y);
|
||||
if (exposures == &expRec) {
|
||||
if (exposures == &expRec)
|
||||
RegionUninit(exposures);
|
||||
}
|
||||
else if (exposures && exposures != prgn && exposures != other_exposed)
|
||||
RegionDestroy(exposures);
|
||||
if (prgn)
|
||||
RegionEmpty(prgn);
|
||||
RegionEmpty(prgn);
|
||||
}
|
||||
else if (exposures && exposures != prgn)
|
||||
RegionDestroy(exposures);
|
||||
}
|
||||
|
||||
#ifdef ROOTLESS
|
||||
|
|
|
@ -79,7 +79,7 @@ static void miOverlayMarkUnrealizedWindow(WindowPtr, WindowPtr, Bool);
|
|||
static int miOverlayValidateTree(WindowPtr, WindowPtr, VTKind);
|
||||
static void miOverlayHandleExposures(WindowPtr);
|
||||
static void miOverlayMoveWindow(WindowPtr, int, int, WindowPtr, VTKind);
|
||||
static void miOverlayWindowExposures(WindowPtr, RegionPtr, RegionPtr);
|
||||
static void miOverlayWindowExposures(WindowPtr, RegionPtr);
|
||||
static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int,
|
||||
unsigned int, WindowPtr);
|
||||
static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool);
|
||||
|
@ -827,7 +827,7 @@ miOverlayHandleExposures(WindowPtr pWin)
|
|||
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||
WindowPtr pChild;
|
||||
ValidatePtr val;
|
||||
void (*WindowExposures) (WindowPtr, RegionPtr, RegionPtr);
|
||||
WindowExposuresProcPtr WindowExposures;
|
||||
|
||||
WindowExposures = pWin->drawable.pScreen->WindowExposures;
|
||||
if (pPriv->underlayMarked) {
|
||||
|
@ -849,8 +849,7 @@ miOverlayHandleExposures(WindowPtr pWin)
|
|||
}
|
||||
RegionUninit(&mival->borderExposed);
|
||||
|
||||
(*WindowExposures) (pTree->pWin, &mival->exposed,
|
||||
NullRegion);
|
||||
(*WindowExposures) (pTree->pWin, &mival->exposed);
|
||||
RegionUninit(&mival->exposed);
|
||||
}
|
||||
free(mival);
|
||||
|
@ -886,7 +885,7 @@ miOverlayHandleExposures(WindowPtr pWin)
|
|||
if (RegionNotEmpty(&val->after.borderExposed)) {
|
||||
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
|
||||
}
|
||||
(*WindowExposures) (pChild, &val->after.exposed, NullRegion);
|
||||
(*WindowExposures) (pChild, &val->after.exposed);
|
||||
}
|
||||
RegionUninit(&val->after.borderExposed);
|
||||
RegionUninit(&val->after.exposed);
|
||||
|
@ -980,42 +979,23 @@ miOverlayMoveWindow(WindowPtr pWin,
|
|||
#endif
|
||||
|
||||
static void
|
||||
miOverlayWindowExposures(WindowPtr pWin,
|
||||
RegionPtr prgn, RegionPtr other_exposed)
|
||||
miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
|
||||
{
|
||||
RegionPtr exposures = prgn;
|
||||
|
||||
if ((prgn && !RegionNil(prgn)) ||
|
||||
(exposures && !RegionNil(exposures)) || other_exposed) {
|
||||
if (prgn && !RegionNil(prgn)) {
|
||||
RegionRec expRec;
|
||||
int clientInterested;
|
||||
|
||||
clientInterested = (pWin->eventMask | wOtherEventMasks(pWin)) &
|
||||
ExposureMask;
|
||||
if (other_exposed) {
|
||||
if (exposures) {
|
||||
RegionUnion(other_exposed, exposures, other_exposed);
|
||||
if (exposures != prgn)
|
||||
RegionDestroy(exposures);
|
||||
}
|
||||
exposures = other_exposed;
|
||||
}
|
||||
if (clientInterested && exposures &&
|
||||
(RegionNumRects(exposures) > RECTLIMIT)) {
|
||||
int clientInterested =
|
||||
(pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
|
||||
if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||
BoxRec box;
|
||||
|
||||
box = *RegionExtents(exposures);
|
||||
if (exposures == prgn) {
|
||||
exposures = &expRec;
|
||||
RegionInit(exposures, &box, 1);
|
||||
RegionReset(prgn, &box);
|
||||
}
|
||||
else {
|
||||
RegionReset(exposures, &box);
|
||||
RegionUnion(prgn, prgn, exposures);
|
||||
}
|
||||
box = *RegionExtents(prgn);
|
||||
exposures = &expRec;
|
||||
RegionInit(exposures, &box, 1);
|
||||
RegionReset(prgn, &box);
|
||||
/* This is the only reason why we are replacing mi's version
|
||||
of this file */
|
||||
|
||||
|
@ -1027,21 +1007,14 @@ miOverlayWindowExposures(WindowPtr pWin,
|
|||
else
|
||||
RegionIntersect(prgn, prgn, &pWin->clipList);
|
||||
}
|
||||
if (prgn && !RegionNil(prgn))
|
||||
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||
if (clientInterested && exposures && !RegionNil(exposures))
|
||||
miPaintWindow(pWin, prgn, PW_BACKGROUND);
|
||||
if (clientInterested)
|
||||
miSendExposures(pWin, exposures,
|
||||
pWin->drawable.x, pWin->drawable.y);
|
||||
if (exposures == &expRec) {
|
||||
if (exposures == &expRec)
|
||||
RegionUninit(exposures);
|
||||
}
|
||||
else if (exposures && exposures != prgn && exposures != other_exposed)
|
||||
RegionDestroy(exposures);
|
||||
if (prgn)
|
||||
RegionEmpty(prgn);
|
||||
RegionEmpty(prgn);
|
||||
}
|
||||
else if (exposures && exposures != prgn)
|
||||
RegionDestroy(exposures);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
|
@ -1491,11 +1464,7 @@ miOverlaySetShape(WindowPtr pWin, int kind)
|
|||
|
||||
if (WasViewable) {
|
||||
(*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
||||
|
||||
(*pScreen->ValidateTree) (pWin->parent, NullWindow, VTOther);
|
||||
}
|
||||
|
||||
if (WasViewable) {
|
||||
(*pScreen->HandleExposures) (pWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pWin->parent, NullWindow,
|
||||
|
@ -1592,7 +1561,6 @@ miOverlayClearToBackground(WindowPtr pWin,
|
|||
miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin);
|
||||
BoxRec box;
|
||||
RegionRec reg;
|
||||
RegionPtr pBSReg = NullRegion;
|
||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||
miOverlayScreenPtr pScreenPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
|
||||
RegionPtr clipList;
|
||||
|
@ -1636,12 +1604,10 @@ miOverlayClearToBackground(WindowPtr pWin,
|
|||
|
||||
RegionIntersect(®, ®, clipList);
|
||||
if (generateExposures)
|
||||
(*pScreen->WindowExposures) (pWin, ®, pBSReg);
|
||||
(*pScreen->WindowExposures) (pWin, ®);
|
||||
else if (pWin->backgroundState != None)
|
||||
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
||||
RegionUninit(®);
|
||||
if (pBSReg)
|
||||
RegionDestroy(pBSReg);
|
||||
}
|
||||
|
||||
/****************************************************************/
|
||||
|
|
|
@ -259,13 +259,12 @@ miScreenInit(ScreenPtr pScreen, void *pbits, /* pointer to screen bits */
|
|||
/* CreateColormap, DestroyColormap, InstallColormap, UninstallColormap */
|
||||
/* ListInstalledColormaps, StoreColors, ResolveColor */
|
||||
/* BitmapToRegion */
|
||||
pScreen->SendGraphicsExpose = miSendGraphicsExpose;
|
||||
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr) NoopDDA;
|
||||
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr) NoopDDA;
|
||||
pScreen->MarkWindow = miMarkWindow;
|
||||
pScreen->MarkOverlappedWindows = miMarkOverlappedWindows;
|
||||
pScreen->MoveWindow = miMoveWindow;
|
||||
pScreen->ResizeWindow = miSlideAndSizeWindow;
|
||||
pScreen->ResizeWindow = miResizeWindow;
|
||||
pScreen->GetLayerWindow = miGetLayerWindow;
|
||||
pScreen->HandleExposures = miHandleValidateExposures;
|
||||
pScreen->ReparentWindow = (ReparentWindowProcPtr) 0;
|
||||
|
|
|
@ -99,8 +99,10 @@ Equipment Corporation.
|
|||
#include "mi.h"
|
||||
#include "regionstr.h"
|
||||
#include "mivalidate.h"
|
||||
|
||||
#include "globals.h"
|
||||
#ifdef COMPOSITE
|
||||
#include "compint.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compute the visibility of a shaped window
|
||||
|
@ -160,17 +162,6 @@ miShapedWindowIn(RegionPtr universe, RegionPtr bounding,
|
|||
return rgnOUT;
|
||||
}
|
||||
|
||||
static GetRedirectBorderClipProcPtr miGetRedirectBorderClipProc;
|
||||
static SetRedirectBorderClipProcPtr miSetRedirectBorderClipProc;
|
||||
|
||||
void
|
||||
miRegisterRedirectBorderClipProc(SetRedirectBorderClipProcPtr setBorderClip,
|
||||
GetRedirectBorderClipProcPtr getBorderClip)
|
||||
{
|
||||
miSetRedirectBorderClipProc = setBorderClip;
|
||||
miGetRedirectBorderClipProc = getBorderClip;
|
||||
}
|
||||
|
||||
/*
|
||||
* Manual redirected windows are treated as transparent; they do not obscure
|
||||
* siblings or parent windows
|
||||
|
@ -242,11 +233,9 @@ miComputeClips(WindowPtr pParent,
|
|||
* In redirected drawing case, reset universe to borderSize
|
||||
*/
|
||||
if (pParent->redirectDraw != RedirectDrawNone) {
|
||||
if (miSetRedirectBorderClipProc) {
|
||||
if (TreatAsTransparent(pParent))
|
||||
RegionEmpty(universe);
|
||||
(*miSetRedirectBorderClipProc) (pParent, universe);
|
||||
}
|
||||
if (TreatAsTransparent(pParent))
|
||||
RegionEmpty(universe);
|
||||
compSetRedirectBorderClip (pParent, universe);
|
||||
RegionCopy(universe, &pParent->borderSize);
|
||||
}
|
||||
#endif
|
||||
|
@ -516,6 +505,17 @@ miTreeObscured(WindowPtr pParent)
|
|||
}
|
||||
}
|
||||
|
||||
static RegionPtr
|
||||
getBorderClip(WindowPtr pWin)
|
||||
{
|
||||
#ifdef COMPOSITE
|
||||
if (pWin->redirectDraw != RedirectDrawNone)
|
||||
return compGetRedirectBorderClip(pWin);
|
||||
else
|
||||
#endif
|
||||
return &pWin->borderClip;
|
||||
}
|
||||
|
||||
/*
|
||||
*-----------------------------------------------------------------------
|
||||
* miValidateTree --
|
||||
|
@ -609,14 +609,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
|
|||
forward = TRUE;
|
||||
for (pWin = pChild; pWin; pWin = pWin->nextSib) {
|
||||
if (pWin->valdata) {
|
||||
RegionPtr pBorderClip = &pWin->borderClip;
|
||||
|
||||
#ifdef COMPOSITE
|
||||
if (pWin->redirectDraw != RedirectDrawNone &&
|
||||
miGetRedirectBorderClipProc)
|
||||
pBorderClip = (*miGetRedirectBorderClipProc) (pWin);
|
||||
#endif
|
||||
RegionAppend(&totalClip, pBorderClip);
|
||||
RegionAppend(&totalClip, getBorderClip(pWin));
|
||||
if (pWin->viewable)
|
||||
viewvals++;
|
||||
}
|
||||
|
@ -627,14 +620,7 @@ miValidateTree(WindowPtr pParent, /* Parent to validate */
|
|||
pWin = pParent->lastChild;
|
||||
while (1) {
|
||||
if (pWin->valdata) {
|
||||
RegionPtr pBorderClip = &pWin->borderClip;
|
||||
|
||||
#ifdef COMPOSITE
|
||||
if (pWin->redirectDraw != RedirectDrawNone &&
|
||||
miGetRedirectBorderClipProc)
|
||||
pBorderClip = (*miGetRedirectBorderClipProc) (pWin);
|
||||
#endif
|
||||
RegionAppend(&totalClip, pBorderClip);
|
||||
RegionAppend(&totalClip, getBorderClip(pWin));
|
||||
if (pWin->viewable)
|
||||
viewvals++;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ miClearToBackground(WindowPtr pWin,
|
|||
|
||||
RegionIntersect(®, ®, &pWin->clipList);
|
||||
if (generateExposures)
|
||||
(*pWin->drawable.pScreen->WindowExposures) (pWin, ®, NULL);
|
||||
(*pWin->drawable.pScreen->WindowExposures) (pWin, ®);
|
||||
else if (pWin->backgroundState != None)
|
||||
miPaintWindow(pWin, ®, PW_BACKGROUND);
|
||||
RegionUninit(®);
|
||||
|
@ -221,7 +221,7 @@ miHandleValidateExposures(WindowPtr pWin)
|
|||
if (RegionNotEmpty(&val->after.borderExposed))
|
||||
miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER);
|
||||
RegionUninit(&val->after.borderExposed);
|
||||
(*WindowExposures) (pChild, &val->after.exposed, NullRegion);
|
||||
(*WindowExposures) (pChild, &val->after.exposed);
|
||||
RegionUninit(&val->after.exposed);
|
||||
free(val);
|
||||
pChild->valdata = NULL;
|
||||
|
@ -292,9 +292,9 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind)
|
|||
RegionDestroy(oldRegion);
|
||||
/* XXX need to retile border if ParentRelative origin */
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NULL, kind);
|
||||
}
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow, kind);
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured();
|
||||
|
@ -337,9 +337,8 @@ miRecomputeExposures(WindowPtr pWin, void *value)
|
|||
}
|
||||
|
||||
void
|
||||
miSlideAndSizeWindow(WindowPtr pWin,
|
||||
int x, int y,
|
||||
unsigned int w, unsigned int h, WindowPtr pSib)
|
||||
miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h,
|
||||
WindowPtr pSib)
|
||||
{
|
||||
WindowPtr pParent;
|
||||
Bool WasViewable = (Bool) (pWin->viewable);
|
||||
|
@ -608,11 +607,12 @@ miSlideAndSizeWindow(WindowPtr pWin,
|
|||
RegionDestroy(pRegion);
|
||||
if (destClip)
|
||||
RegionDestroy(destClip);
|
||||
if (anyMarked)
|
||||
if (anyMarked) {
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||
VTOther);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pFirstChange,
|
||||
VTOther);
|
||||
}
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured();
|
||||
|
@ -664,17 +664,14 @@ miSetShape(WindowPtr pWin, int kind)
|
|||
if (WasViewable) {
|
||||
anyMarked |= (*pScreen->MarkOverlappedWindows) (pWin, pWin, NULL);
|
||||
|
||||
if (anyMarked)
|
||||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, NullWindow,
|
||||
VTOther);
|
||||
}
|
||||
|
||||
if (WasViewable) {
|
||||
if (anyMarked)
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NullWindow,
|
||||
VTOther);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, NULL,
|
||||
VTOther);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (pWin->realized)
|
||||
|
@ -726,10 +723,10 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width)
|
|||
if (anyMarked) {
|
||||
(*pScreen->ValidateTree) (pLayerWin->parent, pLayerWin, VTOther);
|
||||
(*pScreen->HandleExposures) (pLayerWin->parent);
|
||||
if (pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||
VTOther);
|
||||
}
|
||||
if (anyMarked && pScreen->PostValidateTree)
|
||||
(*pScreen->PostValidateTree) (pLayerWin->parent, pLayerWin,
|
||||
VTOther);
|
||||
}
|
||||
if (pWin->realized)
|
||||
WindowsRestructured();
|
||||
|
|
|
@ -106,64 +106,6 @@ Equipment Corporation.
|
|||
|
||||
int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, VTKind kind);
|
||||
|
||||
/*
|
||||
* Compute the visibility of a shaped window
|
||||
*/
|
||||
static int
|
||||
RootlessShapedWindowIn(RegionPtr universe,
|
||||
RegionPtr bounding, BoxPtr rect, int x, int y)
|
||||
{
|
||||
BoxRec box;
|
||||
register BoxPtr boundBox;
|
||||
int nbox;
|
||||
Bool someIn, someOut;
|
||||
register int t, x1, y1, x2, y2;
|
||||
|
||||
nbox = RegionNumRects(bounding);
|
||||
boundBox = RegionRects(bounding);
|
||||
someIn = someOut = FALSE;
|
||||
x1 = rect->x1;
|
||||
y1 = rect->y1;
|
||||
x2 = rect->x2;
|
||||
y2 = rect->y2;
|
||||
while (nbox--) {
|
||||
if ((t = boundBox->x1 + x) < x1)
|
||||
t = x1;
|
||||
box.x1 = t;
|
||||
if ((t = boundBox->y1 + y) < y1)
|
||||
t = y1;
|
||||
box.y1 = t;
|
||||
if ((t = boundBox->x2 + x) > x2)
|
||||
t = x2;
|
||||
box.x2 = t;
|
||||
if ((t = boundBox->y2 + y) > y2)
|
||||
t = y2;
|
||||
box.y2 = t;
|
||||
if (box.x1 > box.x2)
|
||||
box.x2 = box.x1;
|
||||
if (box.y1 > box.y2)
|
||||
box.y2 = box.y1;
|
||||
switch (RegionContainsRect(universe, &box)) {
|
||||
case rgnIN:
|
||||
if (someOut)
|
||||
return rgnPART;
|
||||
someIn = TRUE;
|
||||
break;
|
||||
case rgnOUT:
|
||||
if (someIn)
|
||||
return rgnPART;
|
||||
someOut = TRUE;
|
||||
break;
|
||||
default:
|
||||
return rgnPART;
|
||||
}
|
||||
boundBox++;
|
||||
}
|
||||
if (someIn)
|
||||
return rgnIN;
|
||||
return rgnOUT;
|
||||
}
|
||||
|
||||
#define HasParentRelativeBorder(w) (!(w)->borderIsPixel && \
|
||||
HasBorder(w) && \
|
||||
(w)->backgroundState == ParentRelative)
|
||||
|
@ -229,10 +171,9 @@ RootlessComputeClips(WindowPtr pParent, ScreenPtr pScreen,
|
|||
RegionPtr pBounding;
|
||||
|
||||
if ((pBounding = wBoundingShape(pParent))) {
|
||||
switch (RootlessShapedWindowIn(universe,
|
||||
pBounding, &borderSize,
|
||||
pParent->drawable.x,
|
||||
pParent->drawable.y)) {
|
||||
switch (miShapedWindowIn(universe, pBounding, &borderSize,
|
||||
pParent->drawable.x,
|
||||
pParent->drawable.y)) {
|
||||
case rgnIN:
|
||||
newVis = VisibilityUnobscured;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue