summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-03-09 10:45:48 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-04-19 07:30:06 +1000
commitf641ae412287ecb7a3437987e2ba1646a8443aa4 (patch)
treed21452aa57a8118f42aa68b25aac3a535f50f182 /Xi
parent577bebe2067293bb154068e99a2ef085b066cb67 (diff)
Xi: don't deliver emulated motion events for non-emulating touches
The touchpoint knows whether it should be emulating or not and we have a check for that later. Check for this before we generate the event and try to deliver it, lest we trigger a bug warning. https://bugzilla.redhat.com/show_bug.cgi?id=1282252 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/exevents.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 74e49edb5..5a0b68d2f 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -1379,6 +1379,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti,
if (!TouchResourceIsOwner(ti, listener->listener))
return !Success;
+ if (!ti->emulate_pointer)
+ return !Success;
+
nevents = TouchConvertToPointerEvent(ev, &motion, &button);
BUG_RETURN_VAL(nevents == 0, BadValue);