Merge remote-tracking branch 'whot/for-keith'

This commit is contained in:
Keith Packard 2013-12-19 14:14:59 -08:00
commit 4b1ead9d34
2 changed files with 5 additions and 3 deletions

View File

@ -1413,7 +1413,8 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
!(ev->device_event.flags & TOUCH_CLIENT_ID))
TouchListenerAcceptReject(dev, ti, 0, XIAcceptTouch);
if (deliveries && ev->any.type == ET_TouchEnd &&
if (ev->any.type == ET_TouchEnd &&
ti->num_listeners == 1 &&
!dev->button->buttonsDown &&
dev->deviceGrab.fromPassiveGrab && GrabIsPointerGrab(grab)) {
(*dev->deviceGrab.DeactivateGrab) (dev);
@ -1845,7 +1846,8 @@ DeliverTouchBeginEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (rc == Success) {
listener->state = LISTENER_IS_OWNER;
/* async grabs cannot replay, so automatically accept this touch */
if (dev->deviceGrab.grab &&
if (listener->type == LISTENER_POINTER_GRAB &&
dev->deviceGrab.grab &&
dev->deviceGrab.fromPassiveGrab &&
dev->deviceGrab.grab->pointerMode == GrabModeAsync)
ActivateEarlyAccept(dev, ti);

View File

@ -4696,7 +4696,7 @@ DeviceEnterLeaveEvent(DeviceIntPtr mouse,
filter = GetEventFilter(mouse, (xEvent *) event);
if (grab && grab->type == XI2) {
if (grab && grab->grabtype == XI2) {
Mask mask;
mask = xi2mask_isset(grab->xi2mask, mouse, type);