mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
FIXME xfixes: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -400,18 +400,17 @@ ProcXFixesGetCursorImage(ClientPtr client)
|
||||
int
|
||||
ProcXFixesSetCursorName(ClientPtr client)
|
||||
{
|
||||
CursorPtr pCursor;
|
||||
char *tchar;
|
||||
Atom atom;
|
||||
|
||||
X_REQUEST_HEAD_AT_LEAST(xXFixesSetCursorNameReq);
|
||||
X_REQUEST_FIELD_CARD32(cursor);
|
||||
X_REQUEST_FIELD_CARD16(nbytes);
|
||||
REQUEST_FIXED_SIZE(xXFixesSetCursorNameReq, stuff->nbytes);
|
||||
|
||||
CursorPtr pCursor;
|
||||
char *tchar;
|
||||
|
||||
VERIFY_CURSOR(pCursor, stuff->cursor, client, DixSetAttrAccess);
|
||||
tchar = (char *) &stuff[1];
|
||||
atom = MakeAtom(tchar, stuff->nbytes, TRUE);
|
||||
Atom atom = MakeAtom(tchar, stuff->nbytes, TRUE);
|
||||
if (atom == BAD_RESOURCE)
|
||||
return BadAlloc;
|
||||
|
||||
@@ -620,12 +619,12 @@ TestForCursor(CursorPtr pCursor, void *closure)
|
||||
int
|
||||
ProcXFixesChangeCursor(ClientPtr client)
|
||||
{
|
||||
CursorPtr pSource, pDestination;
|
||||
|
||||
X_REQUEST_HEAD_STRUCT(xXFixesChangeCursorReq);
|
||||
X_REQUEST_FIELD_CARD32(source);
|
||||
X_REQUEST_FIELD_CARD32(destination);
|
||||
|
||||
CursorPtr pSource, pDestination;
|
||||
|
||||
VERIFY_CURSOR(pSource, stuff->source, client,
|
||||
DixReadAccess | DixGetAttrAccess);
|
||||
VERIFY_CURSOR(pDestination, stuff->destination, client,
|
||||
@@ -897,7 +896,6 @@ int
|
||||
ProcXFixesCreatePointerBarrier(ClientPtr client)
|
||||
{
|
||||
X_REQUEST_HEAD_AT_LEAST(xXFixesCreatePointerBarrierReq);
|
||||
|
||||
X_REQUEST_FIELD_CARD16(num_devices);
|
||||
X_REQUEST_FIELD_CARD32(barrier);
|
||||
X_REQUEST_FIELD_CARD32(window);
|
||||
|
||||
Reference in New Issue
Block a user