diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2011-08-31 00:46:52 +0200 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@apple.com> | 2011-10-04 20:08:24 -0700 |
commit | 347f5610ca023fb31485aa19c20607af8bf9c834 (patch) | |
tree | 5ed75f9f3da4c78f4138c6dc607b540ee56c69ae /Xi | |
parent | 7b74bb67528033bf2d2a1714a801c38e7822642e (diff) |
Xi: Fix passive XI2 ungrabs on XIAll[Master]Devices
The corresponding DeviceIntPtr wasn't being gotten properly,
resulting in BadDevice from dixLookupDevice().
Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit f52d5cd374563544dafe29587411f345e31bbdf8)
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/xipassivegrab.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c index ae4343344..5cdd8aca6 100644 --- a/Xi/xipassivegrab.c +++ b/Xi/xipassivegrab.c @@ -261,9 +261,16 @@ ProcXIPassiveUngrabDevice(ClientPtr client) REQUEST(xXIPassiveUngrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); - rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); - if (rc != Success) - return rc; + if (stuff->deviceid == XIAllDevices) + dev = inputInfo.all_devices; + else if (stuff->deviceid == XIAllMasterDevices) + dev = inputInfo.all_master_devices; + else + { + rc = dixLookupDevice(&dev, stuff->deviceid, client, DixGrabAccess); + if (rc != Success) + return rc; + } if (stuff->grab_type != XIGrabtypeButton && stuff->grab_type != XIGrabtypeKeycode && |