mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Xi: inline SProcXGrabDevice()
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:
committed by
Enrico Weigelt
parent
2b9c079b86
commit
88ed85dffc
@@ -376,7 +376,7 @@ SProcIDispatch(ClientPtr client)
|
||||
case X_ChangePointerDevice:
|
||||
return ProcXChangePointerDevice(client);
|
||||
case X_GrabDevice:
|
||||
return SProcXGrabDevice(client);
|
||||
return ProcXGrabDevice(client);
|
||||
case X_UngrabDevice:
|
||||
return ProcXUngrabDevice(client);
|
||||
case X_GrabDeviceKey:
|
||||
|
||||
44
Xi/grabdev.c
44
Xi/grabdev.c
@@ -67,31 +67,6 @@ SOFTWARE.
|
||||
extern XExtEventInfo EventInfo[];
|
||||
extern int ExtEventIndex;
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Swap the request if the requestor has a different byte order than us.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGrabDevice(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||
|
||||
swapl(&stuff->grabWindow);
|
||||
swapl(&stuff->time);
|
||||
swaps(&stuff->event_count);
|
||||
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||
|
||||
return (ProcXGrabDevice(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Grab an extension device.
|
||||
@@ -101,18 +76,27 @@ SProcXGrabDevice(ClientPtr client)
|
||||
int
|
||||
ProcXGrabDevice(ClientPtr client)
|
||||
{
|
||||
int rc;
|
||||
DeviceIntPtr dev;
|
||||
GrabMask mask;
|
||||
struct tmask tmp[EMASKSIZE];
|
||||
|
||||
REQUEST(xGrabDeviceReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&stuff->grabWindow);
|
||||
swapl(&stuff->time);
|
||||
swaps(&stuff->event_count);
|
||||
}
|
||||
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
if (client->swapped)
|
||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||
|
||||
int rc;
|
||||
DeviceIntPtr dev;
|
||||
GrabMask mask;
|
||||
struct tmask tmp[EMASKSIZE];
|
||||
|
||||
xGrabDeviceReply rep = {
|
||||
.RepType = X_GrabDevice,
|
||||
};
|
||||
|
||||
@@ -76,7 +76,6 @@ int SProcXGetDeviceMotionEvents(ClientPtr client);
|
||||
int SProcXGetExtensionVersion(ClientPtr client);
|
||||
int SProcXGetSelectedExtensionEvents(ClientPtr client);
|
||||
int SProcXGrabDeviceButton(ClientPtr client);
|
||||
int SProcXGrabDevice(ClientPtr client);
|
||||
int SProcXGrabDeviceKey(ClientPtr client);
|
||||
int SProcXIAllowEvents(ClientPtr client);
|
||||
int SProcXIBarrierReleasePointer(ClientPtr client);
|
||||
|
||||
Reference in New Issue
Block a user