From d7420911d0b5b7353ac836dcd09336819a4db05b Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Dec 2025 18:41:28 +0100 Subject: [PATCH] [PR #1515] dix: inline SProcGetProperty() PR: https://github.com/X11Libre/xserver/pull/1515 --- dix/property.c | 14 +++++++++++--- dix/swapreq.c | 13 ------------- dix/swapreq.h | 1 - dix/tables.c | 2 +- 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/dix/property.c b/dix/property.c index cb6dd35a7..52e1491a7 100644 --- a/dix/property.c +++ b/dix/property.c @@ -525,14 +525,22 @@ DeleteAllWindowProperties(WindowPtr pWin) int ProcGetProperty(ClientPtr client) { + REQUEST(xGetPropertyReq); + REQUEST_SIZE_MATCH(xGetPropertyReq); + + if (client->swapped) { + swapl(&stuff->window); + swapl(&stuff->property); + swapl(&stuff->type); + swapl(&stuff->longOffset); + swapl(&stuff->longLength); + } + PropertyPtr pProp, prevProp; unsigned long n, len, ind; int rc; Mask win_mode = DixGetPropAccess, prop_mode = DixReadAccess; - REQUEST(xGetPropertyReq); - REQUEST_SIZE_MATCH(xGetPropertyReq); - if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return BadAtom; diff --git a/dix/swapreq.c b/dix/swapreq.c index 4a4b30428..4e8643118 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -170,19 +170,6 @@ SProcConfigureWindow(ClientPtr client) } -int _X_COLD -SProcGetProperty(ClientPtr client) -{ - REQUEST(xGetPropertyReq); - REQUEST_SIZE_MATCH(xGetPropertyReq); - swapl(&stuff->window); - swapl(&stuff->property); - swapl(&stuff->type); - swapl(&stuff->longOffset); - swapl(&stuff->longLength); - return ((*ProcVector[X_GetProperty]) (client)); -} - int _X_COLD SProcConvertSelection(ClientPtr client) { diff --git a/dix/swapreq.h b/dix/swapreq.h index b9a462e89..71615d864 100644 --- a/dix/swapreq.h +++ b/dix/swapreq.h @@ -55,7 +55,6 @@ int SProcFillPoly(ClientPtr client); int SProcFreeColors(ClientPtr client); int SProcGetImage(ClientPtr client); int SProcGetMotionEvents(ClientPtr client); -int SProcGetProperty(ClientPtr client); int SProcImageText(ClientPtr client); int SProcListFonts(ClientPtr client); int SProcListFontsWithInfo(ClientPtr client); diff --git a/dix/tables.c b/dix/tables.c index 97c8cd69b..4dfead73a 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -352,7 +352,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { ProcGetAtomName, ProcChangeProperty, ProcDeleteProperty, - SProcGetProperty, /* 20 */ + ProcGetProperty, /* 20 */ ProcListProperties, ProcSetSelectionOwner, ProcGetSelectionOwner,