mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Xi: use REQUEST_HEAD_STRUCT and REQUEST_FIELD_* macros
Use the new macros to make request struct parsing / field swapping much easier. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
e8ec547b93
commit
4395caee14
@@ -38,6 +38,7 @@
|
||||
#include <X11/extensions/XI2proto.h>
|
||||
|
||||
#include "dix/dix_priv.h"
|
||||
#include "dix/request_priv.h"
|
||||
#include "Xi/handlers.h"
|
||||
|
||||
#include "inputstr.h" /* DeviceIntPtr */
|
||||
@@ -50,18 +51,14 @@
|
||||
int
|
||||
ProcXISetClientPointer(ClientPtr client)
|
||||
{
|
||||
X_REQUEST_HEAD_STRUCT(xXISetClientPointerReq);
|
||||
X_REQUEST_FIELD_CARD32(win);
|
||||
X_REQUEST_FIELD_CARD16(deviceid);
|
||||
|
||||
DeviceIntPtr pDev;
|
||||
ClientPtr targetClient;
|
||||
int rc;
|
||||
|
||||
REQUEST(xXISetClientPointerReq);
|
||||
REQUEST_SIZE_MATCH(xXISetClientPointerReq);
|
||||
|
||||
if (client->swapped) {
|
||||
swapl(&stuff->win);
|
||||
swaps(&stuff->deviceid);
|
||||
}
|
||||
|
||||
rc = dixLookupDevice(&pDev, stuff->deviceid, client, DixManageAccess);
|
||||
if (rc != Success) {
|
||||
client->errorValue = stuff->deviceid;
|
||||
|
||||
Reference in New Issue
Block a user