From 01914b1c5379fefcc9dc68d59f8c84b9eeeebe7e Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 11 Jun 2025 13:41:13 -0700 Subject: [PATCH] Revert "randr: ProcRRGetOutputProperty(): use SwapShort()/SwapLong()" This reverts commit 8789be52a4ce4a285636f8c4efc2bd196fe571a2. Part-of: --- randr/rrproperty.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/randr/rrproperty.c b/randr/rrproperty.c index 122f5ab64..315e5b275 100644 --- a/randr/rrproperty.c +++ b/randr/rrproperty.c @@ -727,26 +727,24 @@ ProcRRGetOutputProperty(ClientPtr client) swapl(&rep.bytesAfter); swapl(&rep.nItems); } + WriteToClient(client, sizeof(rep), &rep); if (len) { memcpy(extra, (char *) prop_value->data + ind, len); switch (rep.format) { case 32: - if (client->swapped) - SwapLongs((CARD32*)extra, len / sizeof(CARD32)); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap32Write; break; case 16: - if (client->swapped) - SwapShorts((short*)extra, len / sizeof(CARD16)); + client->pSwapReplyFunc = (ReplySwapPtr) CopySwap16Write; break; default: + client->pSwapReplyFunc = (ReplySwapPtr) WriteToClient; break; } + WriteSwappedDataToClient(client, len, extra); + free(extra); } - WriteToClient(client, sizeof(rep), &rep); - WriteToClient(client, len, extra); - free(extra); - if (stuff->delete && (rep.bytesAfter == 0)) { /* delete the Property */ *prev = prop->next; RRDestroyOutputProperty(prop);