aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xi/grabdevk.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xi/grabdevk.c')
-rw-r--r--nx-X11/programs/Xserver/Xi/grabdevk.c38
1 files changed, 15 insertions, 23 deletions
diff --git a/nx-X11/programs/Xserver/Xi/grabdevk.c b/nx-X11/programs/Xserver/Xi/grabdevk.c
index 26469c4b7..29498b08a 100644
--- a/nx-X11/programs/Xserver/Xi/grabdevk.c
+++ b/nx-X11/programs/Xserver/Xi/grabdevk.c
@@ -107,51 +107,43 @@ ProcXGrabDeviceKey(ClientPtr client)
REQUEST(xGrabDeviceKeyReq);
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
- if (stuff->length !=(sizeof(xGrabDeviceKeyReq)>>2) + stuff->event_count)
- {
+ if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) {
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadLength);
return Success;
}
dev = LookupDeviceIntRec(stuff->grabbed_device);
- if (dev == NULL)
- {
- SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0,
- BadDevice);
+ if (dev == NULL) {
+ SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
return Success;
}
- if (stuff->modifier_device != UseXKeyboard)
- {
+ if (stuff->modifier_device != UseXKeyboard) {
mdev = LookupDeviceIntRec(stuff->modifier_device);
- if (mdev == NULL)
- {
- SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0,
- BadDevice);
+ if (mdev == NULL) {
+ SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadDevice);
return Success;
}
- if (mdev->key == NULL)
- {
- SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0,
- BadMatch);
+ if (mdev->key == NULL) {
+ SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, BadMatch);
return Success;
}
- }
- else
+ } else
mdev = (DeviceIntPtr) LookupKeyboardDevice();
class = (XEventClass *) (&stuff[1]); /* first word of values */
if ((ret = CreateMaskFromList(client, class,
- stuff->event_count, tmp, dev, X_GrabDeviceKey)) != Success)
+ stuff->event_count, tmp, dev,
+ X_GrabDeviceKey)) != Success)
return Success;
ret = GrabKey(client, dev, stuff->this_device_mode,
- stuff->other_devices_mode, stuff->modifiers, mdev, stuff->key,
- stuff->grabWindow, stuff->ownerEvents, tmp[stuff->grabbed_device].mask);
+ stuff->other_devices_mode, stuff->modifiers, mdev,
+ stuff->key, stuff->grabWindow, stuff->ownerEvents,
+ tmp[stuff->grabbed_device].mask);
- if (ret != Success)
- {
+ if (ret != Success) {
SendErrorToClient(client, IReqCode, X_GrabDeviceKey, 0, ret);
return Success;
}