mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-18 19:52:21 +00:00
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
4 changed files with 72 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue