mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 19:30:31 +01:00
Touch: Fix duplicate TouchBegin selection with virtual devices
Given the following scenario:
1) client A selects for TouchBegin on window W for device D
2) client B selects for TouchBegin on window W for XIAllDevices
3) client C selects for TouchBegin on window W with device E
Step 3 will fail with BadImplementation, because attempting to look up
XIAllDevices or XIAllMasterDevices with dixLookupDevices doesn't work.
This should succeed (or, if it was selecting for device D, fail with
BadAccess as it would be a duplicate selection).
Fix this by performing the appropriate lookup for virtual devices.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Chase Douglas <chase.douglas@ubuntu.com>
(cherry picked from commit 3d2b768efa)
This commit is contained in:
parent
e31e272f4f
commit
aacfc321b4
1 changed files with 7 additions and 2 deletions
|
|
@ -180,8 +180,13 @@ ProcXISelectEvents(ClientPtr client)
|
|||
if (CLIENT_ID(iclient->resource) == client->index)
|
||||
continue;
|
||||
|
||||
dixLookupDevice(&tmp, evmask->deviceid, serverClient,
|
||||
DixReadAccess);
|
||||
if (evmask->deviceid == XIAllDevices)
|
||||
tmp = inputInfo.all_devices;
|
||||
else if (evmask->deviceid == XIAllMasterDevices)
|
||||
tmp = inputInfo.all_master_devices;
|
||||
else
|
||||
dixLookupDevice(&tmp, evmask->deviceid, serverClient,
|
||||
DixReadAccess);
|
||||
if (!tmp)
|
||||
return BadImplementation; /* this shouldn't happen */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue