Bug 55738 - Weird behavior when there are active and passive touch grabs at the same time
Summary: Weird behavior when there are active and passive touch grabs at the same time
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Peter Hutterer
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-07 18:45 UTC by Tom Jaeger
Modified: 2012-11-01 22:52 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
test case (2.40 KB, text/plain)
2012-10-07 18:45 UTC, Tom Jaeger
no flags Details
0001-Xi-don-t-deliver-TouchEnd-to-a-client-waiting-for-To.patch (1.02 KB, patch)
2012-10-17 04:10 UTC, Peter Hutterer
no flags Details | Splinter Review

Description Tom Jaeger 2012-10-07 18:45:52 UTC
Created attachment 68221 [details]
test case

Hi Peter,

This is probably not big deal in practice, but since I noticed it I might as well report it.  The issue is that if there is an active and a passive touch grab at the same time, then there is a TouchEnd event reported immediately after the initial TouchBegin.  Test case is attached:

$ gcc touchgrab.c -lXi -Wall -std=c99 -o touchgrab && ./touchgrab 2 accept
TouchBegin: 15 -> 2
TouchEnd: 15 -> 2
TouchBegin: 15 -> 2
TouchUpdate: 15 -> 2
TouchEnd: 15 -> 2
TouchEnd: 15 -> 2

This is the result of a simple two-finger tap gesture.
Comment 1 Peter Hutterer 2012-10-12 06:29:08 UTC
confirmed. Thanks for the test case, that makes my life a lot easier.
Comment 2 Peter Hutterer 2012-10-17 04:10:21 UTC
Created attachment 68663 [details] [review]
0001-Xi-don-t-deliver-TouchEnd-to-a-client-waiting-for-To.patch

preliminary patch. this appears to fix this issue, though I hope it doesn't have any side-effects
Comment 3 Tom Jaeger 2012-10-17 04:17:26 UTC
Thanks.  I can confirm that it fixes the reported issue.  I'll let you know if I notice any side effects.
Comment 4 Peter Hutterer 2012-10-17 04:19:42 UTC
I forgot: I've copied your test case to the XIT suit. Hope that's ok:

http://cgit.freedesktop.org/~whot/xorg-integration-tests/commit/?h=devel&id=bc0024dbbb9b283626c1b167c086156482701f3e
Comment 5 Peter Hutterer 2012-10-19 03:12:12 UTC
http://patchwork.freedesktop.org/patch/12260/
Comment 6 Peter Hutterer 2012-11-01 22:52:39 UTC
commit 676447190190d8546165e21be242cf16dd69f5ae
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Oct 17 14:13:29 2012 +1000

    Xi: don't deliver TouchEnd to a client waiting for TouchBegin (#55738)


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.