diff options
author | Eamon Walsh <ewalsh@tycho.nsa.gov> | 2007-08-15 14:13:53 -0400 |
---|---|---|
committer | Eamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil> | 2007-08-15 14:13:53 -0400 |
commit | dc84bb3418933297a8c005070902d9a91ed3d18f (patch) | |
tree | f639091ce50ef1772e4dceb10045975f275e8fb5 /render | |
parent | b424e01ec59d9600a02823f1522949325797268c (diff) |
xace: add hooks + new access codes: core protocol cursor requests
Diffstat (limited to 'render')
-rw-r--r-- | render/render.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/render/render.c b/render/render.c index caaa2781c..e57ffb126 100644 --- a/render/render.c +++ b/render/render.c @@ -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 |