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/grabdevk.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/grabdevk.c')
-rw-r--r-- | Xi/grabdevk.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Xi/grabdevk.c b/Xi/grabdevk.c index aefe11b1e..96e2e62ac 100644 --- a/Xi/grabdevk.c +++ b/Xi/grabdevk.c @@ -101,6 +101,8 @@ ProcXGrabDeviceKey(ClientPtr client) DeviceIntPtr mdev; XEventClass *class; struct tmask tmp[EMASKSIZE]; + GrabParameters param; + GrabMask mask; REQUEST(xGrabDeviceKeyReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); @@ -133,10 +135,16 @@ 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.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; } |