From 4d5bdb41cfad9a33d6a4c5823047d034a498f1ef Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Dec 2025 19:07:34 +0100 Subject: [PATCH] [PR #1517] dix: inline SProcRotateProperties() PR: https://github.com/X11Libre/xserver/pull/1517 --- dix/property.c | 12 ++++++++++-- dix/swapreq.c | 12 ------------ dix/swapreq.h | 1 - dix/tables.c | 2 +- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/dix/property.c b/dix/property.c index 5ed159942..cb6dd35a7 100644 --- a/dix/property.c +++ b/dix/property.c @@ -173,9 +173,17 @@ deliverPropertyNotifyEvent(WindowPtr pWin, int state, PropertyPtr pProp) int ProcRotateProperties(ClientPtr client) { - int delta, rc; - REQUEST(xRotatePropertiesReq); + REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); + + if (client->swapped) { + swapl(&stuff->window); + swaps(&stuff->nAtoms); + swaps(&stuff->nPositions); + SwapRestL(stuff); + } + + int delta, rc; PropertyPtr *props; /* array of pointer */ PropertyPtr pProp, saved; diff --git a/dix/swapreq.c b/dix/swapreq.c index 6f3d4aff6..e91d1a42a 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -767,18 +767,6 @@ SProcChangeHosts(ClientPtr client) return ((*ProcVector[X_ChangeHosts]) (client)); } -int _X_COLD -SProcRotateProperties(ClientPtr client) -{ - REQUEST(xRotatePropertiesReq); - REQUEST_AT_LEAST_SIZE(xRotatePropertiesReq); - swapl(&stuff->window); - swaps(&stuff->nAtoms); - swaps(&stuff->nPositions); - SwapRestL(stuff); - return ((*ProcVector[X_RotateProperties]) (client)); -} - void _X_COLD SwapConnClientPrefix(xConnClientPrefix * pCCP) { diff --git a/dix/swapreq.h b/dix/swapreq.h index 28750b495..b9a462e89 100644 --- a/dix/swapreq.h +++ b/dix/swapreq.h @@ -65,7 +65,6 @@ int SProcPutImage(ClientPtr client); int SProcQueryBestSize(ClientPtr client); int SProcQueryColors(ClientPtr client); int SProcReparentWindow(ClientPtr client); -int SProcRotateProperties(ClientPtr client); int SProcSetClipRectangles(ClientPtr client); int SProcSetDashes(ClientPtr client); int SProcSetFontPath(ClientPtr client); diff --git a/dix/tables.c b/dix/tables.c index 86fd9118d..f8aa4b316 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -446,7 +446,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcChangeAccessControl, ProcChangeCloseDownMode, ProcKillClient, - SProcRotateProperties, + ProcRotateProperties, ProcForceScreenSaver, /* 115 */ ProcSetPointerMapping, ProcGetPointerMapping,