[PATCH] Don't end touchpoint if owning client hasn't accepted/rejected
Chase Douglas
chase.douglas at canonical.com
Wed Jan 4 15:50:40 PST 2012
A touchpoint is ended when no further processing will take place for it.
This includes the situation where there is only one grabbing client, and
the client receives a touch end before it has accepted/rejected the
touchpoint.
This change ensures that a delivered touch end event is converted into a
touch update event under the above scenario. If the event is left as a
touch end event, the touchpoint will be ended in ProcessTouchEvent().
Signed-off-by: Chase Douglas <chase.douglas at canonical.com>
---
Xi/exevents.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index db49e31..b3b05f7 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1803,8 +1803,10 @@ DeliverTouchEndEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, InternalEvent *ev,
rc = DeliverOneTouchEvent(client, dev, ti, grab, win, ev);
listener->state = LISTENER_HAS_END;
}
- if (ti->num_listeners > 1 &&
- (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
+ if ((ti->num_listeners > 1 ||
+ (listener->type == LISTENER_GRAB &&
+ xi2mask_isset(xi2mask, dev, XI_TouchOwnership))) &&
+ (ev->device_event.flags & (TOUCH_ACCEPT|TOUCH_REJECT)) == 0)
{
ev->any.type = ET_TouchUpdate;
ev->device_event.flags |= TOUCH_PENDING_END;
--
1.7.7.3
More information about the xorg-devel
mailing list