Xi: assign correct grab_mode/other_device_mode in XI2 passive grabs
CreateGrab() expects the keyboard mode to be stored in grab_mode, and the pointer mode in other_device_mode, so respect this in passive XI2 grabs, and switch modes if needed. Signed-off-by: Carlos Garnacho <carlosg@gnome.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
4469430b10
commit
5b169cb695
|
@ -151,11 +151,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
memset(¶m, 0, sizeof(param));
|
||||
param.grabtype = XI2;
|
||||
param.ownerEvents = stuff->owner_events;
|
||||
param.this_device_mode = stuff->grab_mode;
|
||||
param.other_devices_mode = stuff->paired_device_mode;
|
||||
param.grabWindow = stuff->grab_window;
|
||||
param.cursor = stuff->cursor;
|
||||
|
||||
if (IsKeyboardDevice(dev)) {
|
||||
param.this_device_mode = stuff->grab_mode;
|
||||
param.other_devices_mode = stuff->paired_device_mode;
|
||||
} else {
|
||||
param.this_device_mode = stuff->paired_device_mode;
|
||||
param.other_devices_mode = stuff->grab_mode;
|
||||
}
|
||||
|
||||
if (stuff->cursor != None)
|
||||
{
|
||||
ret = dixLookupResourceByType(&tmp, stuff->cursor,
|
||||
|
|
Loading…
Reference in New Issue
Block a user