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