diff options
author | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-06 18:48:27 +0000 |
commit | a915739887477b28d924ecc8417ee107d125bd6c (patch) | |
tree | c02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/Xi/grabdevk.c | |
parent | 6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff) | |
download | vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2 vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip |
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/Xi/grabdevk.c')
-rw-r--r-- | xorg-server/Xi/grabdevk.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/xorg-server/Xi/grabdevk.c b/xorg-server/Xi/grabdevk.c index 6a245f25a..b34867b5f 100644 --- a/xorg-server/Xi/grabdevk.c +++ b/xorg-server/Xi/grabdevk.c @@ -50,8 +50,6 @@ SOFTWARE. * */ -#define NEED_EVENTS -#define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H #include <dix-config.h> #endif @@ -103,11 +101,13 @@ ProcXGrabDeviceKey(ClientPtr client) DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; REQUEST(xGrabDeviceKeyReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); - if (stuff->length != (sizeof(xGrabDeviceKeyReq) >> 2) + stuff->event_count) + if (stuff->length != bytes_to_int32(sizeof(xGrabDeviceKeyReq)) + stuff->event_count) return BadLength; ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess); @@ -116,14 +116,14 @@ ProcXGrabDeviceKey(ClientPtr client) if (stuff->modifier_device != UseXKeyboard) { ret = dixLookupDevice(&mdev, stuff->modifier_device, client, - DixReadAccess); + DixUseAccess); if (ret != Success) return ret; if (mdev->key == NULL) return BadMatch; } else { mdev = PickKeyboard(client); - ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixReadAccess); + ret = XaceHook(XACE_DEVICE_ACCESS, client, mdev, DixUseAccess); if (ret != Success) return ret; } @@ -135,10 +135,17 @@ ProcXGrabDeviceKey(ClientPtr client) X_GrabDeviceKey)) != Success) return ret; - 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); + + memset(¶m, 0, sizeof(param)); + param.grabtype = GRABTYPE_XI; + param.ownerEvents = stuff->ownerEvents; + param.this_device_mode = stuff->this_device_mode; + param.other_devices_mode = stuff->other_devices_mode; + param.grabWindow = stuff->grabWindow; + param.modifiers = stuff->modifiers; + mask.xi = tmp[stuff->grabbed_device].mask; + + ret = GrabKey(client, dev, mdev, stuff->key, ¶m, GRABTYPE_XI, &mask); return ret; } |