mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 03:44:06 +00:00
Xi: inline SProcXISelectEvents() and SProcXIGetSelectedEvents()
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
0fbb681fce
commit
d7eac08a22
@@ -444,7 +444,7 @@ SProcIDispatch(ClientPtr client)
|
|||||||
case X_XIGetClientPointer:
|
case X_XIGetClientPointer:
|
||||||
return ProcXIGetClientPointer(client);
|
return ProcXIGetClientPointer(client);
|
||||||
case X_XISelectEvents:
|
case X_XISelectEvents:
|
||||||
return SProcXISelectEvents(client);
|
return ProcXISelectEvents(client);
|
||||||
case X_XIQueryVersion:
|
case X_XIQueryVersion:
|
||||||
return ProcXIQueryVersion(client);
|
return ProcXIQueryVersion(client);
|
||||||
case X_XIQueryDevice:
|
case X_XIQueryDevice:
|
||||||
@@ -472,7 +472,7 @@ SProcIDispatch(ClientPtr client)
|
|||||||
case X_XIGetProperty:
|
case X_XIGetProperty:
|
||||||
return ProcXIGetProperty(client);
|
return ProcXIGetProperty(client);
|
||||||
case X_XIGetSelectedEvents:
|
case X_XIGetSelectedEvents:
|
||||||
return SProcXIGetSelectedEvents(client);
|
return ProcXIGetSelectedEvents(client);
|
||||||
case X_XIBarrierReleasePointer:
|
case X_XIBarrierReleasePointer:
|
||||||
return ProcXIBarrierReleasePointer(client);
|
return ProcXIBarrierReleasePointer(client);
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -69,7 +69,4 @@ int ProcXUngrabDeviceButton(ClientPtr client);
|
|||||||
int ProcXUngrabDevice(ClientPtr client);
|
int ProcXUngrabDevice(ClientPtr client);
|
||||||
int ProcXUngrabDeviceKey(ClientPtr client);
|
int ProcXUngrabDeviceKey(ClientPtr client);
|
||||||
|
|
||||||
int SProcXIGetSelectedEvents(ClientPtr client);
|
|
||||||
int SProcXISelectEvents(ClientPtr client);
|
|
||||||
|
|
||||||
#endif /* _XSERVER_XI_HANDLERS_H */
|
#endif /* _XSERVER_XI_HANDLERS_H */
|
||||||
|
|||||||
@@ -113,21 +113,19 @@ XICheckInvalidMaskBits(ClientPtr client, unsigned char *mask, int len)
|
|||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
int
|
||||||
SProcXISelectEvents(ClientPtr client)
|
ProcXISelectEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
int len;
|
|
||||||
xXIEventMask *evmask;
|
|
||||||
|
|
||||||
REQUEST(xXISelectEventsReq);
|
REQUEST(xXISelectEventsReq);
|
||||||
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
|
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
|
||||||
|
|
||||||
|
if (client->swapped) {
|
||||||
swapl(&stuff->win);
|
swapl(&stuff->win);
|
||||||
swaps(&stuff->num_masks);
|
swaps(&stuff->num_masks);
|
||||||
|
|
||||||
len = client->req_len - bytes_to_int32(sizeof(xXISelectEventsReq));
|
int len = client->req_len - bytes_to_int32(sizeof(xXISelectEventsReq));
|
||||||
evmask = (xXIEventMask *) &stuff[1];
|
xXIEventMask *evmask = (xXIEventMask *) &stuff[1];
|
||||||
for (i = 0; i < stuff->num_masks; i++) {
|
for (int i = 0; i < stuff->num_masks; i++) {
|
||||||
if (len < bytes_to_int32(sizeof(xXIEventMask)))
|
if (len < bytes_to_int32(sizeof(xXIEventMask)))
|
||||||
return BadLength;
|
return BadLength;
|
||||||
len -= bytes_to_int32(sizeof(xXIEventMask));
|
len -= bytes_to_int32(sizeof(xXIEventMask));
|
||||||
@@ -139,16 +137,8 @@ SProcXISelectEvents(ClientPtr client)
|
|||||||
evmask =
|
evmask =
|
||||||
(xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4);
|
(xXIEventMask *) (((char *) &evmask[1]) + evmask->mask_len * 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (ProcXISelectEvents(client));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
ProcXISelectEvents(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXISelectEventsReq);
|
|
||||||
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
|
|
||||||
|
|
||||||
if (stuff->num_masks == 0)
|
if (stuff->num_masks == 0)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
|
|
||||||
@@ -327,28 +317,21 @@ ProcXISelectEvents(ClientPtr client)
|
|||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _X_COLD
|
|
||||||
SProcXIGetSelectedEvents(ClientPtr client)
|
|
||||||
{
|
|
||||||
REQUEST(xXIGetSelectedEventsReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
|
|
||||||
swapl(&stuff->win);
|
|
||||||
|
|
||||||
return (ProcXIGetSelectedEvents(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
ProcXIGetSelectedEvents(ClientPtr client)
|
ProcXIGetSelectedEvents(ClientPtr client)
|
||||||
{
|
{
|
||||||
|
REQUEST(xXIGetSelectedEventsReq);
|
||||||
|
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
|
||||||
|
|
||||||
|
if (client->swapped)
|
||||||
|
swapl(&stuff->win);
|
||||||
|
|
||||||
int rc, i;
|
int rc, i;
|
||||||
WindowPtr win;
|
WindowPtr win;
|
||||||
OtherInputMasks *masks;
|
OtherInputMasks *masks;
|
||||||
InputClientsPtr others = NULL;
|
InputClientsPtr others = NULL;
|
||||||
DeviceIntPtr dev;
|
DeviceIntPtr dev;
|
||||||
|
|
||||||
REQUEST(xXIGetSelectedEventsReq);
|
|
||||||
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
|
|
||||||
|
|
||||||
rc = dixLookupWindow(&win, stuff->win, client, DixGetAttrAccess);
|
rc = dixLookupWindow(&win, stuff->win, client, DixGetAttrAccess);
|
||||||
if (rc != Success)
|
if (rc != Success)
|
||||||
return rc;
|
return rc;
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ request_XIGetSelectedEvents(xXIGetSelectedEventsReq * req, int error)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
swapl(&req->win);
|
swapl(&req->win);
|
||||||
rc = SProcXIGetSelectedEvents(&client);
|
rc = ProcXIGetSelectedEvents(&client);
|
||||||
assert(rc == error);
|
assert(rc == error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ request_XISelectEvent(xXISelectEventsReq * req, int error)
|
|||||||
|
|
||||||
swapl(&req->win);
|
swapl(&req->win);
|
||||||
swaps(&req->num_masks);
|
swaps(&req->num_masks);
|
||||||
rc = SProcXISelectEvents(&client);
|
rc = ProcXISelectEvents(&client);
|
||||||
assert(rc == error);
|
assert(rc == error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user