xfixes: write out GetCursorName reply directly

The request handler already does byte-swapping on its own, and
there's no extra reply-swap handler for it, so no need to call
into callbacks here.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-04-02 20:27:16 +02:00
parent fab90591bd
commit 5e43aed54c

View File

@ -448,7 +448,6 @@ int
ProcXFixesGetCursorName(ClientPtr client)
{
CursorPtr pCursor;
xXFixesGetCursorNameReply reply;
REQUEST(xXFixesGetCursorNameReq);
const char *str;
@ -462,7 +461,7 @@ ProcXFixesGetCursorName(ClientPtr client)
str = "";
len = strlen(str);
reply = (xXFixesGetCursorNameReply) {
xXFixesGetCursorNameReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = bytes_to_int32(len),
@ -470,12 +469,12 @@ ProcXFixesGetCursorName(ClientPtr client)
.nbytes = len
};
if (client->swapped) {
swaps(&reply.sequenceNumber);
swapl(&reply.length);
swapl(&reply.atom);
swaps(&reply.nbytes);
swaps(&rep.sequenceNumber);
swapl(&rep.length);
swapl(&rep.atom);
swaps(&rep.nbytes);
}
WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply);
WriteToClient(client, sizeof(rep), &rep);
WriteToClient(client, len, str);
return Success;