diff options
author | marha <marha@users.sourceforge.net> | 2012-12-18 10:03:13 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-12-18 10:03:13 +0100 |
commit | 293fd0043af7e861c9c540bebc44630d0da0bf9b (patch) | |
tree | a2579cb27e39607896c76419af5a1ba2f5964ec9 /xorg-server/dix/events.c | |
parent | 840c8745518b92303d40f6834e9c616587242231 (diff) | |
download | vcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.tar.gz vcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.tar.bz2 vcxsrv-293fd0043af7e861c9c540bebc44630d0da0bf9b.zip |
xserver mesa git update 18 oct 2012
xserver: 3420a7778c7d5eaa638327f31dd460554c257bb1
mesa: dc613f11ddf1f3a6e10c2d99830fb1a84fdb55b2
Diffstat (limited to 'xorg-server/dix/events.c')
-rw-r--r-- | xorg-server/dix/events.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/xorg-server/dix/events.c b/xorg-server/dix/events.c index 3282ef818..31f8d8700 100644 --- a/xorg-server/dix/events.c +++ b/xorg-server/dix/events.c @@ -1503,11 +1503,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; |