dix: inline SProcGrabButton()

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-12-02 18:56:12 +01:00
committed by Enrico Weigelt
parent 3913c997a9
commit 4ee2a5e16a
4 changed files with 12 additions and 19 deletions

View File

@@ -5696,9 +5696,18 @@ ProcGrabKey(ClientPtr client)
int
ProcGrabButton(ClientPtr client)
{
WindowPtr pWin, confineTo;
REQUEST(xGrabButtonReq);
REQUEST_SIZE_MATCH(xGrabButtonReq);
if (client->swapped) {
swapl(&stuff->grabWindow);
swaps(&stuff->eventMask);
swapl(&stuff->confineTo);
swapl(&stuff->cursor);
swaps(&stuff->modifiers);
}
WindowPtr pWin, confineTo;
CursorPtr cursor;
GrabPtr grab;
DeviceIntPtr ptr, modifierDevice;
@@ -5707,7 +5716,6 @@ ProcGrabButton(ClientPtr client)
GrabParameters param;
int rc;
REQUEST_SIZE_MATCH(xGrabButtonReq);
UpdateCurrentTime();
if ((stuff->pointerMode != GrabModeSync) &&
(stuff->pointerMode != GrabModeAsync)) {

View File

@@ -51,8 +51,6 @@ XRetCode ProcWarpPointer(ClientPtr pClient)
XRetCode SProcChangeActivePointerGrab(ClientPtr pClient)
_X_ATTRIBUTE_NONNULL_ARG(1);
XRetCode SProcGrabButton(ClientPtr pClient)
_X_ATTRIBUTE_NONNULL_ARG(1);
XRetCode SProcGrabKey(ClientPtr pClient)
_X_ATTRIBUTE_NONNULL_ARG(1);
XRetCode SProcGrabKeyboard(ClientPtr pClient)

View File

@@ -187,19 +187,6 @@ SProcSendEvent(ClientPtr client)
return ((*ProcVector[X_SendEvent]) (client));
}
int _X_COLD
SProcGrabButton(ClientPtr client)
{
REQUEST(xGrabButtonReq);
REQUEST_SIZE_MATCH(xGrabButtonReq);
swapl(&stuff->grabWindow);
swaps(&stuff->eventMask);
swapl(&stuff->confineTo);
swapl(&stuff->cursor);
swaps(&stuff->modifiers);
return ((*ProcVector[X_GrabButton]) (client));
}
int _X_COLD
SProcUngrabButton(ClientPtr client)
{

View File

@@ -360,7 +360,7 @@ int (*SwappedProcVector[256]) (ClientPtr /* client */) = {
SProcSendEvent, /* 25 */
ProcGrabPointer,
ProcUngrabPointer,
SProcGrabButton,
ProcGrabButton,
SProcUngrabButton,
SProcChangeActivePointerGrab, /* 30 */
SProcGrabKeyboard,