input: Add grabtype to GrabParameters.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
bee02a1541
commit
080b0331b3
|
@ -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;
|
||||
|
|
|
@ -139,6 +139,7 @@ ProcXGrabDeviceButton(ClientPtr client)
|
|||
return ret;
|
||||
|
||||
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;
|
||||
|
|
|
@ -137,6 +137,7 @@ ProcXGrabDeviceKey(ClientPtr client)
|
|||
|
||||
|
||||
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;
|
||||
|
|
|
@ -130,6 +130,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
rep.num_modifiers = 0;
|
||||
|
||||
memset(¶m, 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;
|
||||
|
|
|
@ -5172,6 +5172,7 @@ ProcGrabKey(ClientPtr client)
|
|||
REQUEST_SIZE_MATCH(xGrabKeyReq);
|
||||
|
||||
memset(¶m, 0, sizeof(param));
|
||||
param.grabtype = GRABTYPE_CORE;
|
||||
param.ownerEvents = stuff->ownerEvents;
|
||||
param.this_device_mode = stuff->keyboardMode;
|
||||
param.other_devices_mode = stuff->pointerMode;
|
||||
|
@ -5287,6 +5288,7 @@ ProcGrabButton(ClientPtr client)
|
|||
return rc;
|
||||
|
||||
memset(¶m, 0, sizeof(param));
|
||||
param.grabtype = GRABTYPE_CORE;
|
||||
param.ownerEvents = stuff->ownerEvents;
|
||||
param.this_device_mode = stuff->keyboardMode;
|
||||
param.other_devices_mode = stuff->pointerMode;
|
||||
|
|
|
@ -44,6 +44,7 @@ typedef struct _XIClientRec {
|
|||
|
||||
|
||||
typedef struct _GrabParameters {
|
||||
int grabtype; /* GRABTYPE_CORE, etc. */
|
||||
unsigned int ownerEvents;
|
||||
unsigned int this_device_mode;
|
||||
unsigned int other_devices_mode;
|
||||
|
|
|
@ -86,6 +86,7 @@ static void dix_check_grab_values(void)
|
|||
|
||||
memset(&client, 0, sizeof(client));
|
||||
|
||||
param.grabtype = GRABTYPE_CORE;
|
||||
param.this_device_mode = GrabModeSync;
|
||||
param.other_devices_mode = GrabModeSync;
|
||||
param.modifiers = AnyModifier;
|
||||
|
|
Loading…
Reference in New Issue