mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
Xi: inline SProcXGrabDeviceButton()
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
2c657eb932
commit
07ac2c2c99
@@ -384,7 +384,7 @@ SProcIDispatch(ClientPtr client)
|
||||
case X_UngrabDeviceKey:
|
||||
return SProcXUngrabDeviceKey(client);
|
||||
case X_GrabDeviceButton:
|
||||
return SProcXGrabDeviceButton(client);
|
||||
return ProcXGrabDeviceButton(client);
|
||||
case X_UngrabDeviceButton:
|
||||
return SProcXUngrabDeviceButton(client);
|
||||
case X_AllowDeviceEvents:
|
||||
|
||||
@@ -64,27 +64,6 @@ SOFTWARE.
|
||||
#include "xace.h"
|
||||
#include "grabdev.h"
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Handle requests from clients with a different byte order.
|
||||
*
|
||||
*/
|
||||
|
||||
int _X_COLD
|
||||
SProcXGrabDeviceButton(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceButtonReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
swaps(&stuff->event_count);
|
||||
REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
|
||||
stuff->event_count * sizeof(CARD32));
|
||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||
|
||||
return (ProcXGrabDeviceButton(client));
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* Grab a button on an extension device.
|
||||
@@ -94,6 +73,21 @@ SProcXGrabDeviceButton(ClientPtr client)
|
||||
int
|
||||
ProcXGrabDeviceButton(ClientPtr client)
|
||||
{
|
||||
REQUEST(xGrabDeviceButtonReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&stuff->grabWindow);
|
||||
swaps(&stuff->modifiers);
|
||||
swaps(&stuff->event_count);
|
||||
}
|
||||
|
||||
REQUEST_FIXED_SIZE(xGrabDeviceButtonReq,
|
||||
stuff->event_count * sizeof(CARD32));
|
||||
|
||||
if (client->swapped)
|
||||
SwapLongs((CARD32 *) (&stuff[1]), stuff->event_count);
|
||||
|
||||
int ret;
|
||||
DeviceIntPtr dev;
|
||||
DeviceIntPtr mdev;
|
||||
@@ -101,9 +95,6 @@ ProcXGrabDeviceButton(ClientPtr client)
|
||||
struct tmask tmp[EMASKSIZE];
|
||||
GrabMask mask;
|
||||
|
||||
REQUEST(xGrabDeviceButtonReq);
|
||||
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
|
||||
|
||||
if (client->req_len !=
|
||||
bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
|
||||
return BadLength;
|
||||
|
||||
@@ -73,7 +73,6 @@ int SProcXGetDeviceDontPropagateList(ClientPtr client);
|
||||
int SProcXGetDeviceMotionEvents(ClientPtr client);
|
||||
int SProcXGetExtensionVersion(ClientPtr client);
|
||||
int SProcXGetSelectedExtensionEvents(ClientPtr client);
|
||||
int SProcXGrabDeviceButton(ClientPtr client);
|
||||
int SProcXIAllowEvents(ClientPtr client);
|
||||
int SProcXIBarrierReleasePointer(ClientPtr client);
|
||||
int SProcXIGetClientPointer(ClientPtr client);
|
||||
|
||||
Reference in New Issue
Block a user