xorg-x11-server/0014-Xi-save-state-for-early-acceptance.patch

44 lines
1.5 KiB
Diff

From b51e55b721f5c410bf6332eb993d02c92bde291e Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 1 Mar 2013 09:15:37 +1000
Subject: [PATCH 14/35] 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>
(cherry picked from commit 026627fe19aad007544eccf209f0dea05e67a7a7)
---
Xi/exevents.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 06a0e03..0518bf8 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);
}
--
1.8.2.1