aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/exevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-07-12 08:22:55 +0200
committermarha <marha@users.sourceforge.net>2013-07-12 08:22:55 +0200
commitffce4319c2fb6f4f663cc5a9660e1d5837fcde87 (patch)
tree603d92313dadf957fbaba55afa634de25d3bbd96 /xorg-server/Xi/exevents.c
parentc6069c33e3a4a6d48aa059dbe9a78702dabff9cc (diff)
downloadvcxsrv-ffce4319c2fb6f4f663cc5a9660e1d5837fcde87.tar.gz
vcxsrv-ffce4319c2fb6f4f663cc5a9660e1d5837fcde87.tar.bz2
vcxsrv-ffce4319c2fb6f4f663cc5a9660e1d5837fcde87.zip
libxtrans fontconfig mesa xserver git update 12 Jul 2013
xserver commit 59a6d3f1eb03010ab831b32b03706a1d6143c732 libxtrans commit f6a161f2a003f4da0a2e414b4faa0ee0de0c01f0 fontconfig commit 338ffe6b886ad4ba86ff471cb59c4a5e5ffbe408 mesa commit 1b0d6aef03161eff4c9933548e964fec1258ea44
Diffstat (limited to 'xorg-server/Xi/exevents.c')
-rw-r--r--xorg-server/Xi/exevents.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c
index 2bbc6f091..fd4b80c48 100644
--- a/xorg-server/Xi/exevents.c
+++ b/xorg-server/Xi/exevents.c
@@ -1223,9 +1223,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);
@@ -1883,16 +1887,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;
}