summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2013-03-01 09:15:37 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2013-05-10 14:26:15 +1000
commit026627fe19aad007544eccf209f0dea05e67a7a7 (patch)
treec1e58383fdd86fc701ac6a0698eac56c02e145d6 /Xi
parentd905348134c80f19793eefb761731b00559ddf3a (diff)
Xi: save state for early acceptance
Delivering an event changes the state to LISTENER_IS_OWNER and we thus lose the information of early acceptance. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 0f37d6b74..97fec3541 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1126,10 +1126,10 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
TouchOwnershipEvent *ev)
{
TouchListener *listener = &ti->listeners[0]; /* new owner */
+ int accepted_early = listener->state == LISTENER_EARLY_ACCEPT;
/* Deliver the ownership */
- if (listener->state == LISTENER_AWAITING_OWNER ||
- listener->state == LISTENER_EARLY_ACCEPT)
+ if (listener->state == LISTENER_AWAITING_OWNER || accepted_early)
DeliverTouchEvents(dev, ti, (InternalEvent *) ev,
listener->listener);
else if (listener->state == LISTENER_AWAITING_BEGIN) {
@@ -1151,7 +1151,7 @@ TouchPuntToNextOwner(DeviceIntPtr dev, TouchPointInfoPtr ti,
return;
}
- if (listener->state == LISTENER_EARLY_ACCEPT)
+ if (accepted_early)
ActivateEarlyAccept(dev, ti);
}