diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2013-02-28 15:28:46 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2013-05-10 14:26:15 +1000 |
commit | d905348134c80f19793eefb761731b00559ddf3a (patch) | |
tree | e80d4d48bb61c525de38b06fb39c2bd4bad47da4 | |
parent | 8b0d21044956f3810199d5e2f38ce33069e97be7 (diff) |
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>
-rw-r--r-- | Xi/exevents.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index b1df0cb43..0f37d6b74 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -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; } |