xace: add hooks + new access codes: core protocol cursor requests

This commit is contained in:
Eamon Walsh
2007-08-15 14:13:53 -04:00
committed by Eamon Walsh
parent b424e01ec5
commit dc84bb3418
7 changed files with 113 additions and 107 deletions

View File

@@ -1492,7 +1492,7 @@ ProcRenderCreateCursor (ClientPtr client)
CursorMetricRec cm;
CursorPtr pCursor;
CARD32 twocolor[3];
int ncolor;
int rc, ncolor;
REQUEST_SIZE_MATCH (xRenderCreateCursorReq);
LEGAL_NEW_RESOURCE(stuff->cid, client);
@@ -1659,16 +1659,20 @@ ProcRenderCreateCursor (ClientPtr client)
cm.height = height;
cm.xhot = stuff->x;
cm.yhot = stuff->y;
pCursor = AllocCursorARGB (srcbits, mskbits, argbbits, &cm,
GetColor(twocolor[0], 16),
GetColor(twocolor[0], 8),
GetColor(twocolor[0], 0),
GetColor(twocolor[1], 16),
GetColor(twocolor[1], 8),
GetColor(twocolor[1], 0));
if (pCursor && AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
return (client->noClientException);
return BadAlloc;
rc = AllocARGBCursor(srcbits, mskbits, argbbits, &cm,
GetColor(twocolor[0], 16),
GetColor(twocolor[0], 8),
GetColor(twocolor[0], 0),
GetColor(twocolor[1], 16),
GetColor(twocolor[1], 8),
GetColor(twocolor[1], 0),
&pCursor, client, stuff->cid);
if (rc != Success)
return rc;
if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor))
return BadAlloc;
return client->noClientException;
}
static int