aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/grabdevb.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/Xi/grabdevb.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-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/grabdevb.c')
-rw-r--r--xorg-server/Xi/grabdevb.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/xorg-server/Xi/grabdevb.c b/xorg-server/Xi/grabdevb.c
index 98f7e117d..e235f5313 100644
--- a/xorg-server/Xi/grabdevb.c
+++ b/xorg-server/Xi/grabdevb.c
@@ -50,8 +50,6 @@ SOFTWARE.
*
*/
-#define NEED_EVENTS
-#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@@ -105,12 +103,14 @@ ProcXGrabDeviceButton(ClientPtr client)
DeviceIntPtr mdev;
XEventClass *class;
struct tmask tmp[EMASKSIZE];
+ GrabParameters param;
+ GrabMask mask;
REQUEST(xGrabDeviceButtonReq);
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
if (stuff->length !=
- (sizeof(xGrabDeviceButtonReq) >> 2) + stuff->event_count)
+ bytes_to_int32(sizeof(xGrabDeviceButtonReq)) + stuff->event_count)
return BadLength;
ret = dixLookupDevice(&dev, stuff->grabbed_device, client, DixGrabAccess);
@@ -119,14 +119,14 @@ ProcXGrabDeviceButton(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;
}
@@ -137,10 +137,18 @@ ProcXGrabDeviceButton(ClientPtr client)
stuff->event_count, tmp, dev,
X_GrabDeviceButton)) != Success)
return ret;
- ret = GrabButton(client, dev, stuff->this_device_mode,
- stuff->other_devices_mode, stuff->modifiers, mdev,
- stuff->button, stuff->grabWindow, stuff->ownerEvents,
- (Cursor) 0, (Window) 0, tmp[stuff->grabbed_device].mask);
+
+ memset(&param, 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 = GrabButton(client, dev, mdev, stuff->button, &param,
+ GRABTYPE_XI, &mask);
return ret;
}