Update xfixes server code to major version 3 from xserver CVS, and perform
minor diff-reduction versus xserver CVS.
This commit is contained in:
parent
25bd6ff4a6
commit
8763cca7f9
|
@ -34,11 +34,6 @@ extern int RenderErrBase;
|
|||
#include <regionstr.h>
|
||||
#include <gcstruct.h>
|
||||
#include <window.h>
|
||||
#ifdef SKK
|
||||
#ifdef SHAPE
|
||||
#include <shapeint.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
RESTYPE RegionResType;
|
||||
|
||||
|
@ -155,7 +150,6 @@ SProcXFixesCreateRegionFromBitmap (ClientPtr client)
|
|||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
ProcXFixesCreateRegionFromWindow (ClientPtr client)
|
||||
{
|
||||
|
@ -794,3 +788,63 @@ SProcXFixesSetPictureClipRegion (ClientPtr client)
|
|||
swaps (&stuff->yOrigin, n);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
int
|
||||
ProcXFixesExpandRegion (ClientPtr client)
|
||||
{
|
||||
RegionPtr pSource, pDestination;
|
||||
int ret = Success;
|
||||
REQUEST (xXFixesExpandRegionReq);
|
||||
BoxPtr pTmp;
|
||||
BoxPtr pSrc;
|
||||
int nBoxes;
|
||||
int i;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
|
||||
VERIFY_REGION(pSource, stuff->source, client, SecurityReadAccess);
|
||||
VERIFY_REGION(pDestination, stuff->destination, client, SecurityWriteAccess);
|
||||
|
||||
nBoxes = REGION_NUM_RECTS(pSource);
|
||||
pSrc = REGION_RECTS(pSource);
|
||||
if (nBoxes)
|
||||
{
|
||||
pTmp = xalloc (nBoxes * sizeof (BoxRec));
|
||||
if (!pTmp)
|
||||
return BadAlloc;
|
||||
for (i = 0; i < nBoxes; i++)
|
||||
{
|
||||
pTmp[i].x1 = pSrc[i].x1 - stuff->left;
|
||||
pTmp[i].x2 = pSrc[i].x2 + stuff->right;
|
||||
pTmp[i].y1 = pSrc[i].y1 - stuff->top;
|
||||
pTmp[i].y2 = pSrc[i].y2 + stuff->bottom;
|
||||
}
|
||||
REGION_EMPTY (pScreen, pDestination);
|
||||
for (i = 0; i < nBoxes; i++)
|
||||
{
|
||||
RegionRec r;
|
||||
REGION_INIT (pScreen, &r, &pTmp[i], 0);
|
||||
REGION_UNION (pScreen, pDestination, pDestination, &r);
|
||||
}
|
||||
}
|
||||
if (ret == Success)
|
||||
ret = client->noClientException;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
SProcXFixesExpandRegion (ClientPtr client)
|
||||
{
|
||||
int n;
|
||||
REQUEST (xXFixesExpandRegionReq);
|
||||
|
||||
swaps (&stuff->length, n);
|
||||
REQUEST_SIZE_MATCH (xXFixesExpandRegionReq);
|
||||
swapl (&stuff->source, n);
|
||||
swapl (&stuff->destination, n);
|
||||
swaps (&stuff->left, n);
|
||||
swaps (&stuff->right, n);
|
||||
swaps (&stuff->top, n);
|
||||
swaps (&stuff->bottom, n);
|
||||
return (*ProcXFixesVector[stuff->xfixesReqType]) (client);
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,7 @@ static const int version_requests[] = {
|
|||
X_XFixesQueryVersion, /* before client sends QueryVersion */
|
||||
X_XFixesGetCursorImage, /* Version 1 */
|
||||
X_XFixesChangeCursorByName, /* Version 2 */
|
||||
X_XFixesExpandRegion, /* Version 3 */
|
||||
};
|
||||
|
||||
#define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0]))
|
||||
|
@ -107,6 +108,8 @@ int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
|
|||
ProcXFixesGetCursorImageAndName,
|
||||
ProcXFixesChangeCursor,
|
||||
ProcXFixesChangeCursorByName,
|
||||
/*************** Version 3 ******************/
|
||||
ProcXFixesExpandRegion,
|
||||
};
|
||||
|
||||
static int
|
||||
|
@ -165,6 +168,8 @@ int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = {
|
|||
SProcXFixesGetCursorImageAndName,
|
||||
SProcXFixesChangeCursor,
|
||||
SProcXFixesChangeCursorByName,
|
||||
/*************** Version 3 ******************/
|
||||
SProcXFixesExpandRegion,
|
||||
};
|
||||
|
||||
static int
|
||||
|
|
|
@ -44,7 +44,7 @@ extern int XFixesErrorBase;
|
|||
}
|
||||
|
||||
RegionPtr
|
||||
XFixesRegionCopy (RegionPtr pRegion);
|
||||
XFixesRegionCopy (RegionPtr pRegion);
|
||||
|
||||
|
||||
#endif /* _XFIXES_H_ */
|
||||
|
|
|
@ -230,4 +230,10 @@ ProcXFixesSetPictureClipRegion (ClientPtr client);
|
|||
int
|
||||
SProcXFixesSetPictureClipRegion (ClientPtr client);
|
||||
|
||||
int
|
||||
ProcXFixesExpandRegion (ClientPtr client);
|
||||
|
||||
int
|
||||
SProcXFixesExpandRegion (ClientPtr client);
|
||||
|
||||
#endif /* _XFIXESINT_H_ */
|
||||
|
|
Loading…
Reference in New Issue
Block a user