diff options
Diffstat (limited to 'xserver/Xi/xipassivegrab.c')
-rw-r--r-- | xserver/Xi/xipassivegrab.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xserver/Xi/xipassivegrab.c b/xserver/Xi/xipassivegrab.c index 5cdd8aca6..af46282c8 100644 --- a/xserver/Xi/xipassivegrab.c +++ b/xserver/Xi/xipassivegrab.c @@ -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, |