summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorChase Douglas <chase.douglas@canonical.com>2012-01-04 15:50:40 -0800
committerPeter Hutterer <peter.hutterer@who-t.net>2012-01-06 14:03:07 +1000
commite30c3c5c59abba9713cf3be532a46220aa9aeeca (patch)
tree6206dbc1a2910f345132f08cd71685b275d1d913 /Xi
parent075a473e538efb771497b762101694b6c0c45c2b (diff)
Don't end touchpoint if owning client hasn't accepted/rejected
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@canonical.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index db49e31b8..b3b05f742 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;