mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 09:58:21 +02:00
When deactivating an explicit pointer grab, reject all grabs on touches
Explicit pointer grabs are placed at the head of the touch listener
array for pointer emulated touches. If the grab is deactivated, we must
remove it from all touches for the device.
Signed-off-by: Chase Douglas <chase.douglas@canonical.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 6ca30cb33e)
This commit is contained in:
parent
0dea2b1c93
commit
acb74b9b36
1 changed files with 11 additions and 0 deletions
11
dix/events.c
11
dix/events.c
|
|
@ -1472,6 +1472,8 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
|||
DeviceIntPtr dev;
|
||||
Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
|
||||
mouse->deviceGrab.implicitGrab);
|
||||
XID grab_resource = grab->resource;
|
||||
int i;
|
||||
|
||||
TouchRemovePointerGrab(mouse);
|
||||
|
||||
|
|
@ -1496,6 +1498,15 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
|
|||
ReattachToOldMaster(mouse);
|
||||
|
||||
ComputeFreezes();
|
||||
|
||||
/* If an explicit grab was deactivated, we must remove it from the head of
|
||||
* all the touches' listener lists. */
|
||||
for (i = 0; mouse->touch && i < mouse->touch->num_touches; i++) {
|
||||
TouchPointInfoPtr ti = mouse->touch->touches + i;
|
||||
|
||||
if (ti->active && TouchResourceIsOwner(ti, grab_resource))
|
||||
TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue