Hi all, 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[0], 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: git://people.freedesktop.org/~daniels/inputproto[1] git://people.freedesktop.org/~daniels/xserver git://people.freedesktop.org/~daniels/libXi git://people.freedesktop.org/~daniels/xinput[2] Cheers, Daniel [0]: 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). [1]: There's also a 'multitouch-cumulative' branch which builds on Chase's old repo to more clearly show the spec changes. [2]: 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. :)
signature.asc
Description: Digital signature
_______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel