[PATCHES] Multitouch v3 - please review/test
daniel at fooishbar.org
Fri Dec 17 09:09:24 PST 2010
I've now got multitouch to a stage I'm pretty happy with: grabs and the
'not-for-you' events are implemented basically as discussed and seem to
be working fine, and it's good with both indirect (a Magic Mouse) and
direct (a Lenovo IdeaPad S10-3t) touch devices.
The major difference here is obviously the event delivery: instead of
delivering only to the first applicable target, we now deliver to all
grabbing clients, and the first selecting client. An 'owner' flag
denotes whether or not the client currently owns the stream: grabbing
clients may accept the touch (which ceases delivery to all other
clients), or reject it (removing them from the delivery list and passing
ownership on to the next client).
Note that adding a grab or a selection does not result in starting to
receive touch events mid-stream: if you did not receive the TouchBegin,
you will never receive any events for that touch stream.
At the moment, the spec wording could definitely use some cleaning up,
and ProcessTouchEvents gets a bit hairy in places, which could
definitely be improved by some more pretty macros, or further
refactoring of EventIsDeliverable and friends.
But at this stage, it really just needs some active review and testing -
if you guys could please have a look over it, it'd be much appreciated.
I'll send the patches as followups to this, and they're also in the
'multitouch' branches of the following repos:
: Unfortunately there's a lot of NIH, due to the need to stash the
grab/selection resource IDs, as well as doing the MD/SD delivery in
a single pass (so we don't deliver the same touch sequence to one
client selecting on the SD and another on the MD).
: There's also a 'multitouch-cumulative' branch which builds on
Chase's old repo to more clearly show the spec changes.
: xinput is actually a pretty good example of how _not_ to write a
touch client, since it leaves its grabs hanging. But it does make
for a good testcase of a client which leaves its grabs hanging. :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the xorg-devel