mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-24 01:40:36 +00:00
input: Add grabtype to GrabParameters.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
bee02a1541
commit
080b0331b3
7 changed files with 15 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue