From c2a2ce1d7eef2e19809faaeda1e4309ce0091676 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 16 Sep 2025 16:04:24 +0200 Subject: [PATCH] Xi: inline SProcXAllowDeviceEvents() No need to have a hole bunch of extra functions, if we can just easily inline the few relevant lines. Signed-off-by: Enrico Weigelt, metux IT consult --- Xi/allowev.c | 24 ++++++------------------ Xi/extinit.c | 2 +- Xi/handlers.h | 1 - 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/Xi/allowev.c b/Xi/allowev.c index fc883b16d..aa4cc7dd7 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -60,21 +60,6 @@ SOFTWARE. #include "dix/input_priv.h" #include "Xi/handlers.h" -/*********************************************************************** - * - * This procedure allows frozen events to be routed. - * - */ - -int _X_COLD -SProcXAllowDeviceEvents(ClientPtr client) -{ - REQUEST(xAllowDeviceEventsReq); - REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); - swapl(&stuff->time); - return (ProcXAllowDeviceEvents(client)); -} - /*********************************************************************** * * This procedure allows frozen events to be routed. @@ -84,13 +69,16 @@ SProcXAllowDeviceEvents(ClientPtr client) int ProcXAllowDeviceEvents(ClientPtr client) { + REQUEST(xAllowDeviceEventsReq); + REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); + + if (client->swapped) + swapl(&stuff->time); + TimeStamp time; DeviceIntPtr thisdev; int rc; - REQUEST(xAllowDeviceEventsReq); - REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); - rc = dixLookupDevice(&thisdev, stuff->deviceid, client, DixGetAttrAccess); if (rc != Success) return rc; diff --git a/Xi/extinit.c b/Xi/extinit.c index bd7832171..b0d59d885 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -388,7 +388,7 @@ SProcIDispatch(ClientPtr client) case X_UngrabDeviceButton: return SProcXUngrabDeviceButton(client); case X_AllowDeviceEvents: - return SProcXAllowDeviceEvents(client); + return ProcXAllowDeviceEvents(client); case X_GetDeviceFocus: return ProcXGetDeviceFocus(client); case X_SetDeviceFocus: diff --git a/Xi/handlers.h b/Xi/handlers.h index 377bc5cf1..2e9edb636 100644 --- a/Xi/handlers.h +++ b/Xi/handlers.h @@ -69,7 +69,6 @@ int ProcXUngrabDeviceButton(ClientPtr client); int ProcXUngrabDevice(ClientPtr client); int ProcXUngrabDeviceKey(ClientPtr client); -int SProcXAllowDeviceEvents(ClientPtr client); int SProcXChangeDeviceControl(ClientPtr client); int SProcXChangeDeviceDontPropagateList(ClientPtr client); int SProcXChangeDeviceProperty(ClientPtr client);