summaryrefslogtreecommitdiff
path: root/Xi/grabdevk.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/grabdevk.c')
-rw-r--r--Xi/grabdevk.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c
index 61ab43a20..b75518211 100644
--- a/Xi/grabdevk.c
+++ b/Xi/grabdevk.c
@@ -54,8 +54,8 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include "inputstr.h" /* DeviceIntPtr */
-#include "windowstr.h" /* window structure */
+#include "inputstr.h" /* DeviceIntPtr */
+#include "windowstr.h" /* window structure */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
@@ -105,34 +105,35 @@ ProcXGrabDeviceKey(ClientPtr client)
REQUEST(xGrabDeviceKeyReq);
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
- if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
- return BadLength;
+ if (stuff->length !=
+ bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count)
+ return BadLength;
ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess);
if (ret != Success)
- return ret;
+ return ret;
if (stuff->modifier_device != UseXKeyboard) {
- ret = dixLookupDevice(&mdev, stuff->modifier_device, client,
- DixUseAccess);
- if (ret != Success)
- return ret;
- if (mdev->key == NULL)
- return BadMatch;
- } else {
- mdev = PickKeyboard(client);
- ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess);
- if (ret != Success)
- return ret;
+ ret = dixLookupDevice(&mdev, stuff->modifier_device, client,
+ DixUseAccess);
+ if (ret != Success)
+ return ret;
+ if (mdev->key == NULL)
+ return BadMatch;
+ }
+ else {
+ mdev = PickKeyboard(client);
+ ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess);
+ if (ret != Success)
+ return ret;
}
- class = (XEventClass *) (&stuff[1]); /* first word of values */
+ class = (XEventClass *) (&stuff[1]); /* first word of values */
if ((ret = CreateMaskFromList(client, class,
- stuff->event_count, tmp, dev,
- X_GrabDeviceKey)) != Success)
- return ret;
-
+ stuff->event_count, tmp, dev,
+ X_GrabDeviceKey)) != Success)
+ return ret;
memset(&param, 0, sizeof(param));
param.grabtype = XI;