[PATCH inputproto multitouch] Touch IDs must be at least unique per master device

Chase Douglas chase.douglas at canonical.com
Sun Dec 11 20:53:53 PST 2011


On 12/11/2011 11:41 AM, Daniel Stone wrote:
> Hi,
> 
> On 9 December 2011 21:43, Chase Douglas <chase.douglas at canonical.com> wrote:
>> XIAllowEvents with a master device and a touch ID must uniquely identify
>> a touch sequence. If touch IDs were unique per slave device, multiple
>> slave devices could have valid sequences with the same touch ID, and the
>> sequences may both be grabbed through the same master device grab.
> 
> FWIW, this was deliberate, to avoid having to either keep a shared
> allocation space for touch IDs, or to have differing touch IDs between
> MD and SD delivery.  The idea was that the client should maintain a
> sourceid:touchid tuple, rather than deviceid:touchid.

I think when we made the decision way back, we weren't allowing
XIAllowTouchEvents to be called on master devices. Now, XIAllowEvents
(with touch grabs) can be called on both slave and master devices.

Let's say you've got a touchscreen and an MT trackpad, both attached to
the core master pointer. You start the server and touch both devices at
the same time, yielding idential touch IDs of '1'. Both touches are
grabbed by the same client on the root window using the master device.
The client now wants to accept one and reject the other. If they both
have the same touch ID, it's impossible to determine which touch the
client is making a request for with the given protocol.

-- Chase


More information about the xorg-devel mailing list