Compare commits

...

1 Commits

Author SHA1 Message Date
Enrico Weigelt, metux IT consult d2ba29f5ce 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>
2025-05-15 19:06:37 +02:00

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;