From a5796a80f80aaea2d4db69367462fc17559864f8 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 24 Sep 2025 17:27:21 +0200 Subject: [PATCH] xkb: inline SProcXkbGetIndicatorMap() 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 cf082b02a7..91c5f02c97 100644 --- a/xkb/xkb.c +++ b/xkb/xkb.c @@ -3139,13 +3139,18 @@ XkbAssembleIndicatorMap(ClientPtr client, int ProcXkbGetIndicatorMap(ClientPtr client) { + REQUEST(xkbGetIndicatorMapReq); + REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq); + + if (client->swapped) { + swaps(&stuff->deviceSpec); + swapl(&stuff->which); + } + DeviceIntPtr dev; XkbDescPtr xkb; XkbIndicatorPtr leds; - REQUEST(xkbGetIndicatorMapReq); - REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq); - if (!(client->xkbClientFlags & _XkbClientInitialized)) return BadAccess; diff --git a/xkb/xkbSwap.c b/xkb/xkbSwap.c index 7491de106c..cea0cf8c6b 100644 --- a/xkb/xkbSwap.c +++ b/xkb/xkbSwap.c @@ -193,16 +193,6 @@ SProcXkbSetCompatMap(ClientPtr client) return ProcXkbSetCompatMap(client); } -static int _X_COLD -SProcXkbGetIndicatorMap(ClientPtr client) -{ - REQUEST(xkbGetIndicatorMapReq); - REQUEST_SIZE_MATCH(xkbGetIndicatorMapReq); - swaps(&stuff->deviceSpec); - swapl(&stuff->which); - return ProcXkbGetIndicatorMap(client); -} - static int _X_COLD SProcXkbSetIndicatorMap(ClientPtr client) { @@ -316,7 +306,7 @@ SProcXkbDispatch(ClientPtr client) case X_kbGetIndicatorState: return ProcXkbGetIndicatorState(client); case X_kbGetIndicatorMap: - return SProcXkbGetIndicatorMap(client); + return ProcXkbGetIndicatorMap(client); case X_kbSetIndicatorMap: return SProcXkbSetIndicatorMap(client); case X_kbGetNamedIndicator: