Xi: inline SProcXUngrabDeviceButton()

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 <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-09-17 13:17:04 +02:00
committed by Enrico Weigelt
parent a28cacbef2
commit 9370aafb36
3 changed files with 9 additions and 21 deletions

View File

@@ -386,7 +386,7 @@ SProcIDispatch(ClientPtr client)
case X_GrabDeviceButton:
return ProcXGrabDeviceButton(client);
case X_UngrabDeviceButton:
return SProcXUngrabDeviceButton(client);
return ProcXUngrabDeviceButton(client);
case X_AllowDeviceEvents:
return ProcXAllowDeviceEvents(client);
case X_GetDeviceFocus:

View File

@@ -79,7 +79,6 @@ int SProcXIQueryVersion(ClientPtr client);
int SProcXISelectEvents(ClientPtr client);
int SProcXISetClientPointer(ClientPtr client);
int SProcXIWarpPointer(ClientPtr client);
int SProcXUngrabDeviceButton(ClientPtr client);
int SProcXUngrabDeviceKey(ClientPtr client);
#endif /* _XSERVER_XI_HANDLERS_H */

View File

@@ -67,22 +67,6 @@ SOFTWARE.
ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | \
Mod3Mask | Mod4Mask | Mod5Mask )
/***********************************************************************
*
* Handle requests from a client with a different byte order.
*
*/
int _X_COLD
SProcXUngrabDeviceButton(ClientPtr client)
{
REQUEST(xUngrabDeviceButtonReq);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
swapl(&stuff->grabWindow);
swaps(&stuff->modifiers);
return (ProcXUngrabDeviceButton(client));
}
/***********************************************************************
*
* Release a grab of a button on an extension device.
@@ -92,15 +76,20 @@ SProcXUngrabDeviceButton(ClientPtr client)
int
ProcXUngrabDeviceButton(ClientPtr client)
{
REQUEST(xUngrabDeviceButtonReq);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
if (client->swapped) {
swapl(&stuff->grabWindow);
swaps(&stuff->modifiers);
}
DeviceIntPtr dev;
DeviceIntPtr mdev;
WindowPtr pWin;
GrabPtr temporaryGrab;
int rc;
REQUEST(xUngrabDeviceButtonReq);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
rc = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess);
if (rc != Success)
return rc;