diff options
author | marha <marha@users.sourceforge.net> | 2012-12-18 10:05:10 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-12-18 10:05:10 +0100 |
commit | 1d46380a9bb69897acdadf71b80cd759b0493fad (patch) | |
tree | d8517cf38e0ac8a6ec098d92293e262e99a4c7b9 /xorg-server/Xi/exevents.c | |
parent | 18d9ddc200055ccf6bf285e578e4724159ff69d5 (diff) | |
parent | 293fd0043af7e861c9c540bebc44630d0da0bf9b (diff) | |
download | vcxsrv-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/Xi/exevents.c')
-rw-r--r-- | xorg-server/Xi/exevents.c | 57 |
1 files changed, 33 insertions, 24 deletions
diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index c22d934d7..823e539e8 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1411,7 +1411,7 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, ptrev->device_event.corestate = event_get_corestate(dev, kbd); if (grab) { - /* this side-steps the usual activation mechansims, but... */ + /* this side-steps the usual activation mechanisms, but... */ if (ev->any.type == ET_TouchBegin && !dev->deviceGrab.grab) ActivatePassiveGrab(dev, grab, ptrev, ev); /* also delivers the event */ else { @@ -1568,32 +1568,41 @@ ProcessTouchEvent(InternalEvent *ev, DeviceIntPtr dev) else ti = TouchFindByClientID(dev, touchid); - /* Under the following circumstances we create a new touch record for an - * existing touch: - * - * - The touch may be pointer emulated - * - An explicit grab is active on the device - * - The grab is a pointer grab - * - * This allows for an explicit grab to receive pointer events for an already - * active touch. - */ - if (!ti && type != ET_TouchBegin && emulate_pointer && - dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab && + /* Active pointer grab */ + if (emulate_pointer && dev->deviceGrab.grab && !dev->deviceGrab.fromPassiveGrab && (dev->deviceGrab.grab->grabtype == CORE || dev->deviceGrab.grab->grabtype == XI || - !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))) { - ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, - emulate_pointer); - if (!ti) { - DebugF("[Xi] %s: Failed to create new dix record for explicitly " - "grabbed touchpoint %d\n", - dev->name, touchid); - return; - } + !xi2mask_isset(dev->deviceGrab.grab->xi2mask, dev, XI_TouchBegin))) + { + /* Active pointer grab on touch point and we get a TouchEnd - claim this + * touchpoint accepted, otherwise clients waiting for ownership will + * wait on this touchpoint until this client ungrabs, or the cows come + * home, whichever is earlier */ + if (ti && type == ET_TouchEnd) + TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch); + else if (!ti && type != ET_TouchBegin) { + /* Under the following circumstances we create a new touch record for an + * existing touch: + * + * - The touch may be pointer emulated + * - An explicit grab is active on the device + * - The grab is a pointer grab + * + * This allows for an explicit grab to receive pointer events for an already + * active touch. + */ + ti = TouchBeginTouch(dev, ev->device_event.sourceid, touchid, + emulate_pointer); + if (!ti) { + DebugF("[Xi] %s: Failed to create new dix record for explicitly " + "grabbed touchpoint %d\n", + dev->name, touchid); + return; + } - TouchBuildSprite(dev, ti, ev); - TouchSetupListeners(dev, ti, ev); + TouchBuildSprite(dev, ti, ev); + TouchSetupListeners(dev, ti, ev); + } } if (!ti) { |