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>
(cherry picked from commit 5b169cb695
)
This commit is contained in:
parent
4b39a4be11
commit
977ea84992
|
@ -140,11 +140,17 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
|||
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;
|
||||
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)
|
||||
{
|
||||
status = dixLookupResourceByType(&tmp, stuff->cursor,
|
||||
|
|
Loading…
Reference in New Issue
Block a user