diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-04-28 16:49:45 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-05-01 09:07:37 +1000 |
commit | 6a618929a0c06ba0d6dac13d7e644cd9658d98ed (patch) | |
tree | c716ab8ca481e1b88e6e6a048eba00e42529dd02 /Xi/grabdevb.c | |
parent | e8e26f700c9c70d3f1bb53bdb71d1100f5c43a69 (diff) |
input: reshuffle CreateGrab and friends to take a GrabParameters param.
This is cleaning up work in preparation for XI2 passive grabs.
Diffstat (limited to 'Xi/grabdevb.c')
-rw-r--r-- | Xi/grabdevb.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Xi/grabdevb.c b/Xi/grabdevb.c index 61ced4813..0d1eb636b 100644 --- a/Xi/grabdevb.c +++ b/Xi/grabdevb.c @@ -103,6 +103,8 @@ ProcXGrabDeviceButton(ClientPtr client) DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; REQUEST(xGrabDeviceButtonReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); @@ -135,10 +137,17 @@ 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(¶m, 0, sizeof(param)); + 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, ¶m, + GRABTYPE_XI, &mask); return ret; } |