From 28d930b16c37e7843cef312cd76d10bfd17801d6 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 2 Dec 2025 19:24:43 +0100 Subject: [PATCH] dix: inline SProcQueryColor() Signed-off-by: Enrico Weigelt, metux IT consult --- dix/dispatch.c | 11 ++++++++--- dix/swapreq.c | 10 ---------- dix/swapreq.h | 1 - dix/tables.c | 2 +- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/dix/dispatch.c b/dix/dispatch.c index d7d5a53d43..a51f18be6a 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -3011,12 +3011,17 @@ ProcStoreNamedColor(ClientPtr client) int ProcQueryColors(ClientPtr client) { + REQUEST(xQueryColorsReq); + REQUEST_AT_LEAST_SIZE(xQueryColorsReq); + + if (client->swapped) { + swapl(&stuff->cmap); + SwapRestL(stuff); + } + ColormapPtr pcmp; int rc; - REQUEST(xQueryColorsReq); - - REQUEST_AT_LEAST_SIZE(xQueryColorsReq); rc = dixLookupResourceByType((void **) &pcmp, stuff->cmap, X11_RESTYPE_COLORMAP, client, DixReadAccess); if (rc == Success) { diff --git a/dix/swapreq.c b/dix/swapreq.c index 8f661d7888..4844c3987a 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -613,16 +613,6 @@ SProcStoreNamedColor(ClientPtr client) return ((*ProcVector[X_StoreNamedColor]) (client)); } -int _X_COLD -SProcQueryColors(ClientPtr client) -{ - REQUEST(xQueryColorsReq); - REQUEST_AT_LEAST_SIZE(xQueryColorsReq); - swapl(&stuff->cmap); - SwapRestL(stuff); - return ((*ProcVector[X_QueryColors]) (client)); -} - int _X_COLD SProcCreateCursor(ClientPtr client) { diff --git a/dix/swapreq.h b/dix/swapreq.h index 4abe6a175a..36bd240f8b 100644 --- a/dix/swapreq.h +++ b/dix/swapreq.h @@ -61,7 +61,6 @@ int SProcListFontsWithInfo(ClientPtr client); int SProcOpenFont(ClientPtr client); int SProcPutImage(ClientPtr client); int SProcQueryBestSize(ClientPtr client); -int SProcQueryColors(ClientPtr client); int SProcReparentWindow(ClientPtr client); int SProcSetClipRectangles(ClientPtr client); int SProcSetDashes(ClientPtr client); diff --git a/dix/tables.c b/dix/tables.c index 93b636faa9..0bfc45ebb0 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -423,7 +423,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = { SProcFreeColors, SProcStoreColors, SProcStoreNamedColor, /* 90 */ - SProcQueryColors, + ProcQueryColors, ProcLookupColor, SProcCreateCursor, ProcCreateGlyphCursor,