diff options
author | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-07-12 08:25:37 +0200 |
commit | 66b46719d55e60d53b42858770d6ac40d079ab13 (patch) | |
tree | aad06d011ed8b820685f72ada34e56ee0f2580c6 /xorg-server/Xi/exevents.c | |
parent | f8f0209a691e0d0838d1ef9d602ebacafee2a233 (diff) | |
parent | ffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (diff) | |
download | vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.gz vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.tar.bz2 vcxsrv-66b46719d55e60d53b42858770d6ac40d079ab13.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libxtrans fontconfig mesa xserver git update 12 Jul 2013
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r-- | xorg-server/Xi/exevents.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index 6c40df494..1bf7fd2f8 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1225,9 +1225,13 @@ ProcessTouchOwnershipEvent(TouchOwnershipEvent *ev, else if (ev->reason == XIAcceptTouch) { int i; - /* Go through the motions of ending the touch if the listener has + + /* For pointer-emulated listeners that ungrabbed the active grab, + * the state was forced to LISTENER_HAS_END. Still go + * through the motions of ending the touch if the listener has * already seen the end. This ensures that the touch record is ended in - * the server. */ + * the server. + */ if (ti->listeners[0].state == LISTENER_HAS_END) TouchEmitTouchEnd(dev, ti, TOUCH_ACCEPT, ti->listeners[0].listener); @@ -1887,16 +1891,23 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev, if (listener->type == LISTENER_POINTER_REGULAR || listener->type == LISTENER_POINTER_GRAB) { - rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, - grab, xi2mask); - - /* Once we send a TouchEnd to a legacy listener, we're already well - * past the accepting/rejecting stage (can only happen on - * GrabModeSync + replay. This listener now gets the end event, - * and we can continue. - */ - if (rc == Success) - listener->state = LISTENER_HAS_END; + /* Note: If the active grab was ungrabbed, we already changed the + * state to LISTENER_HAS_END but still get here. So we mustn't + * actually send the event. + * This is part two of the hack in DeactivatePointerGrab + */ + if (listener->state != LISTENER_HAS_END) { + rc = DeliverTouchEmulatedEvent(dev, ti, ev, listener, client, win, + grab, xi2mask); + + /* Once we send a TouchEnd to a legacy listener, we're already well + * past the accepting/rejecting stage (can only happen on + * GrabModeSync + replay. This listener now gets the end event, + * and we can continue. + */ + if (rc == Success) + listener->state = LISTENER_HAS_END; + } goto out; } |