summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-07-29 15:01:08 +0200
committerMarge Bot <emma+marge@anholt.net>2024-10-10 20:59:35 +0000
commitb87314c8766a6f3e4bbc74758f9b0c53d2c4e044 (patch)
treec3218759ed86dfd6c1779dfe02402e036dbb374f /randr
parent73cf8d356061e0a2deca8c09d1030be8ceea2356 (diff)
randr: fix wrong call to RRGetScreenResources() in swapped case
ProcRRGetScreenResources() vs. RRGetScreenResourcesCurrent() have different semantics - this also must be followed in byte-swapped case. Fixes: fc70839431 - Add server support for RRGetScreenResourcesCurrent Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1630>
Diffstat (limited to 'randr')
-rw-r--r--randr/rrsdispatch.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/randr/rrsdispatch.c b/randr/rrsdispatch.c
index 1f29d9d39..627e0c220 100644
--- a/randr/rrsdispatch.c
+++ b/randr/rrsdispatch.c
@@ -116,6 +116,17 @@ SProcRRGetScreenResources(ClientPtr client)
}
static int _X_COLD
+SProcRRGetScreenResourcesCurrent(ClientPtr client)
+{
+ REQUEST(xRRGetScreenResourcesCurrentReq);
+
+ REQUEST_SIZE_MATCH(xRRGetScreenResourcesCurrentReq);
+ swaps(&stuff->length);
+ swapl(&stuff->window);
+ return (*ProcRandrVector[stuff->randrReqType]) (client);
+}
+
+static int _X_COLD
SProcRRGetOutputInfo(ClientPtr client)
{
REQUEST(xRRGetOutputInfoReq);
@@ -667,7 +678,7 @@ int (*SProcRandrVector[RRNumberRequests]) (ClientPtr) = {
SProcRRGetCrtcGamma, /* 23 */
SProcRRSetCrtcGamma, /* 24 */
/* V1.3 additions */
- SProcRRGetScreenResources, /* 25 GetScreenResourcesCurrent */
+ SProcRRGetScreenResourcesCurrent, /* 25 */
SProcRRSetCrtcTransform, /* 26 */
SProcRRGetCrtcTransform, /* 27 */
SProcRRGetPanning, /* 28 */