aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/events.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-12-18 10:05:10 +0100
committermarha <marha@users.sourceforge.net>2012-12-18 10:05:10 +0100
commit1d46380a9bb69897acdadf71b80cd759b0493fad (patch)
treed8517cf38e0ac8a6ec098d92293e262e99a4c7b9 /xorg-server/dix/events.c
parent18d9ddc200055ccf6bf285e578e4724159ff69d5 (diff)
parent293fd0043af7e861c9c540bebc44630d0da0bf9b (diff)
downloadvcxsrv-1d46380a9bb69897acdadf71b80cd759b0493fad.tar.gz
vcxsrv-1d46380a9bb69897acdadf71b80cd759b0493fad.tar.bz2
vcxsrv-1d46380a9bb69897acdadf71b80cd759b0493fad.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xserver mesa git update 18 oct 2012
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r--xorg-server/dix/events.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c
index 970c420d5..8f207b2da 100644
--- a/xorg-server/dix/events.c
+++ b/xorg-server/dix/events.c
@@ -1506,11 +1506,27 @@ DeactivatePointerGrab(DeviceIntPtr mouse)
{
GrabPtr grab = mouse->deviceGrab.grab;
DeviceIntPtr dev;
+ Bool wasPassive = mouse->deviceGrab.fromPassiveGrab;
Bool wasImplicit = (mouse->deviceGrab.fromPassiveGrab &&
mouse->deviceGrab.implicitGrab);
XID grab_resource = grab->resource;
int i;
+ /* If an explicit grab was deactivated, we must remove it from the head of
+ * all the touches' listener lists. */
+ for (i = 0; !wasPassive && mouse->touch && i < mouse->touch->num_touches; i++) {
+ TouchPointInfoPtr ti = mouse->touch->touches + i;
+ if (ti->active && TouchResourceIsOwner(ti, grab_resource)) {
+ /* Rejecting will generate a TouchEnd, but we must not
+ emulate a ButtonRelease here. So pretend the listener
+ already has the end event */
+ if (grab->grabtype == CORE || grab->grabtype == XI ||
+ !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))
+ ti->listeners[0].state = LISTENER_HAS_END;
+ TouchListenerAcceptReject(mouse, ti, 0, XIRejectTouch);
+ }
+ }
+
TouchRemovePointerGrab(mouse);
mouse->valuator->motionHintWindow = NullWindow;