(1890) 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 9f0fa773b9
commit 3b6ed4ae76

View File

@@ -456,7 +456,6 @@ int
ProcXFixesGetCursorName(ClientPtr client)
{
CursorPtr pCursor;
xXFixesGetCursorNameReply reply;
REQUEST(xXFixesGetCursorNameReq);
const char *str;
@@ -470,7 +469,7 @@ ProcXFixesGetCursorName(ClientPtr client)
str = "";
len = strlen(str);
reply = (xXFixesGetCursorNameReply) {
xXFixesGetCursorNameReply rep = {
.type = X_Reply,
.sequenceNumber = client->sequence,
.length = bytes_to_int32(len),
@@ -478,12 +477,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;