mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Xi: if a passive async grab is activated from an emulated touch, accept
Async grabs cannot replay events, they cannot reject, so we can do an early accept here. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -1848,8 +1848,14 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
|
||||
listener->type == LISTENER_POINTER_GRAB) {
|
||||
rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win,
|
||||
grab, xi2mask);
|
||||
if (rc == Success)
|
||||
if (rc == Success) {
|
||||
listener->state = LISTENER_IS_OWNER;
|
||||
/* async grabs cannot replay, so automatically accept this touch */
|
||||
if (dev->deviceGrab.grab &&
|
||||
dev->deviceGrab.fromPassiveGrab &&
|
||||
dev->deviceGrab.grab->pointerMode == GrabModeAsync)
|
||||
ActivateEarlyAccept(dev, ti);
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user