From 2d71f0579f707b1d25678f3803bbd45531e79762 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 24 Sep 2025 17:25:14 +0200 Subject: [PATCH] xkb: inline SProcXkbGetGeometry() No need to have whole extra functions for just a few LoC. Signed-off-by: Enrico Weigelt, metux IT consult --- xkb/xkb.c | 11 ++++++++--- xkb/xkbSwap.c | 12 +----------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/xkb/xkb.c b/xkb/xkb.c index 5a501edb21..346a5a0a15 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -4843,14 +4843,19 @@ XkbAssembleGeometry(ClientPtr client, int ProcXkbGetGeometry(ClientPtr client) { + REQUEST(xkbGetGeometryReq); + REQUEST_SIZE_MATCH(xkbGetGeometryReq); + + if (client->swapped) { + swaps(&stuff->deviceSpec); + swapl(&stuff->name); + } + DeviceIntPtr dev; XkbGeometryPtr geom; Bool shouldFree; Status status; - REQUEST(xkbGetGeometryReq); - REQUEST_SIZE_MATCH(xkbGetGeometryReq); - if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index b70172e382..4c69c3ad20 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -139,16 +139,6 @@ SProcXkbSetIndicatorMap(ClientPtr client) return ProcXkbSetIndicatorMap(client); } -static int _X_COLD -SProcXkbGetGeometry(ClientPtr client) -{ - REQUEST(xkbGetGeometryReq); - REQUEST_SIZE_MATCH(xkbGetGeometryReq); - swaps(&stuff->deviceSpec); - swapl(&stuff->name); - return ProcXkbGetGeometry(client); -} - static int _X_COLD SProcXkbGetKbdByName(ClientPtr client) { @@ -202,7 +192,7 @@ SProcXkbDispatch(ClientPtr client) case X_kbSetNames: return ProcXkbSetNames(client); case X_kbGetGeometry: - return SProcXkbGetGeometry(client); + return ProcXkbGetGeometry(client); case X_kbSetGeometry: return ProcXkbSetGeometry(client); case X_kbPerClientFlags: