input: Add grabtype to GrabParameters.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-06-01 13:33:29 +10:00
commit 080b0331b3
7 changed files with 15 additions and 0 deletions

View file

@ -1388,6 +1388,14 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
int
CheckGrabValues(ClientPtr client, GrabParameters* param)
{
if (param->grabtype != GRABTYPE_CORE &&
param->grabtype != GRABTYPE_XI &&
param->grabtype != GRABTYPE_XI2)
{
ErrorF("[Xi] grabtype is invalid. This is a bug.\n");
return BadImplementation;
}
if ((param->this_device_mode != GrabModeSync) &&
(param->this_device_mode != GrabModeAsync)) {
client->errorValue = param->this_device_mode;

View file

@ -139,6 +139,7 @@ ProcXGrabDeviceButton(ClientPtr client)
return ret;
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;

View file

@ -137,6 +137,7 @@ ProcXGrabDeviceKey(ClientPtr client)
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;

View file

@ -130,6 +130,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
rep.num_modifiers = 0;
memset(&param, 0, sizeof(param));
param.grabtype = GRABTYPE_XI2;
param.ownerEvents = stuff->owner_events;
param.this_device_mode = stuff->grab_mode;
param.other_devices_mode = stuff->paired_device_mode;