Async grabs cannot replay events, they cannot reject, so we can do an early accept here.
Signed-off-by: Peter Hutterer <[email protected]> --- Xi/exevents.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Xi/exevents.c b/Xi/exevents.c index 52067cf..654fa06 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -1846,8 +1846,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; } -- 1.8.1.4 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
