mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-27 12:19:10 +00:00
xfixes: use REPLY_*() macros for preparing / sending replies
Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -384,15 +384,13 @@ ProcXFixesGetCursorImage(ClientPtr client)
|
||||
.cursorSerial = pCursor->serialNumber,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&reply.x);
|
||||
swaps(&reply.y);
|
||||
swaps(&reply.width);
|
||||
swaps(&reply.height);
|
||||
swaps(&reply.xhot);
|
||||
swaps(&reply.yhot);
|
||||
swapl(&reply.cursorSerial);
|
||||
}
|
||||
REPLY_FIELD_CARD16(x);
|
||||
REPLY_FIELD_CARD16(y);
|
||||
REPLY_FIELD_CARD16(width);
|
||||
REPLY_FIELD_CARD16(height);
|
||||
REPLY_FIELD_CARD16(xhot);
|
||||
REPLY_FIELD_CARD16(yhot);
|
||||
REPLY_FIELD_CARD32(cursorSerial);
|
||||
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
@@ -440,10 +438,9 @@ ProcXFixesGetCursorName(ClientPtr client)
|
||||
.atom = pCursor->name,
|
||||
.nbytes = strlen(str)
|
||||
};
|
||||
if (client->swapped) {
|
||||
swapl(&reply.atom);
|
||||
swaps(&reply.nbytes);
|
||||
}
|
||||
|
||||
REPLY_FIELD_CARD32(atom);
|
||||
REPLY_FIELD_CARD16(nbytes);
|
||||
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
@@ -499,17 +496,15 @@ ProcXFixesGetCursorImageAndName(ClientPtr client)
|
||||
.nbytes = strlen(name),
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&reply.x);
|
||||
swaps(&reply.y);
|
||||
swaps(&reply.width);
|
||||
swaps(&reply.height);
|
||||
swaps(&reply.xhot);
|
||||
swaps(&reply.yhot);
|
||||
swapl(&reply.cursorSerial);
|
||||
swapl(&reply.cursorName);
|
||||
swaps(&reply.nbytes);
|
||||
}
|
||||
REPLY_FIELD_CARD16(x);
|
||||
REPLY_FIELD_CARD16(y);
|
||||
REPLY_FIELD_CARD16(width);
|
||||
REPLY_FIELD_CARD16(height);
|
||||
REPLY_FIELD_CARD16(xhot);
|
||||
REPLY_FIELD_CARD16(yhot);
|
||||
REPLY_FIELD_CARD32(cursorSerial);
|
||||
REPLY_FIELD_CARD32(cursorName);
|
||||
REPLY_FIELD_CARD16(nbytes);
|
||||
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
@@ -84,9 +84,7 @@ ProcXFixesGetClientDisconnectMode(ClientPtr client)
|
||||
.disconnect_mode = pDisconnect->disconnect_mode,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&reply.disconnect_mode);
|
||||
}
|
||||
REPLY_FIELD_CARD32(disconnect_mode);
|
||||
|
||||
return X_SEND_REPLY_SIMPLE(client, reply);
|
||||
}
|
||||
|
||||
@@ -435,14 +435,10 @@ ProcXFixesFetchRegion(ClientPtr client)
|
||||
.height = pExtent->y2 - pExtent->y1,
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&reply.sequenceNumber);
|
||||
swapl(&reply.length);
|
||||
swaps(&reply.x);
|
||||
swaps(&reply.y);
|
||||
swaps(&reply.width);
|
||||
swaps(&reply.height);
|
||||
}
|
||||
REPLY_FIELD_CARD16(x);
|
||||
REPLY_FIELD_CARD16(y);
|
||||
REPLY_FIELD_CARD16(width);
|
||||
REPLY_FIELD_CARD16(height);
|
||||
|
||||
return X_SEND_REPLY_WITH_RPCBUF(client, reply, rpcbuf);
|
||||
}
|
||||
|
||||
@@ -89,10 +89,8 @@ ProcXFixesQueryVersion(ClientPtr client)
|
||||
.minorVersion = minor
|
||||
};
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&reply.majorVersion);
|
||||
swapl(&reply.minorVersion);
|
||||
}
|
||||
REPLY_FIELD_CARD32(majorVersion);
|
||||
REPLY_FIELD_CARD32(minorVersion);
|
||||
|
||||
return X_SEND_REPLY_SIMPLE(client, reply);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user