aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/grabdevk.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/Xi/grabdevk.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/Xi/grabdevk.c')
-rw-r--r--xorg-server/Xi/grabdevk.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/xorg-server/Xi/grabdevk.c b/xorg-server/Xi/grabdevk.c
index 61ab43a20..b75518211 100644
--- a/xorg-server/Xi/grabdevk.c
+++ b/xorg-server/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;