mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-07 09:00:16 +01:00
Input: Don't freeze unrelated devices in DeliverGrabbedEvent
When delivering an event to a device grabbed with SyncBoth, DeliverGrabbedEvent walks the device tree looking for associated devices to freeze them. Unfortunately, it froze all devices instead of just the paired device, and the previous fix in4fbadc8b17would still break if the same client had a non-SyncBoth grab on another unrelated master device. Fix this by completely ignoring devices that aren't our paired device. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> (cherry picked from commitb636893137)
This commit is contained in:
parent
ff066dc75b
commit
e9ba0539de
1 changed files with 3 additions and 4 deletions
|
|
@ -3872,16 +3872,15 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev,
|
|||
switch (grabinfo->sync.state)
|
||||
{
|
||||
case FREEZE_BOTH_NEXT_EVENT:
|
||||
for (dev = inputInfo.devices; dev; dev = dev->next)
|
||||
dev = GetPairedDevice(thisDev);
|
||||
if (dev)
|
||||
{
|
||||
if (dev == thisDev)
|
||||
continue;
|
||||
FreezeThaw(dev, TRUE);
|
||||
if ((dev->deviceGrab.sync.state == FREEZE_BOTH_NEXT_EVENT) &&
|
||||
(CLIENT_BITS(grab->resource) ==
|
||||
CLIENT_BITS(dev->deviceGrab.grab->resource)))
|
||||
dev->deviceGrab.sync.state = FROZEN_NO_EVENT;
|
||||
else if (GetPairedDevice(thisDev) == dev)
|
||||
else
|
||||
dev->deviceGrab.sync.other = grab;
|
||||
}
|
||||
/* fall through */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue