[RFC] Multitouch support, step one

Simon Thum simon.thum at gmx.de
Mon Mar 15 10:34:48 PDT 2010

Am 15.03.2010 07:56, schrieb Peter Hutterer:
> XI2 allows devices to change at runtime. Hence a device may add or remove
> valuators on-the-fly as touchpoints appear and disappear. There is a chance
> of a race condition here. If a driver decides to add/remove valuators
> together with the touchpoints, a client that skips events may miss out.
> e.g. if a DeviceChanged event that removes an axis is followed by one that
> adds an axis, a client may only take the second one as current, thus
> thinking the axis was never removed. There is nothing in the XI2 specs that
> prohibits this. Anyways, adding removing axes together with touchpoints
> seems superfluous if we use the presence of an axis as indicator for touch.
> Rather, I think a device should be set up with a fixed number of valuators
> describing the default maximum number of touchpoints. Additional ones can be
> added at runtime if necessary.
I also see the inherent racyness here, but I guess one could work that
out by a few routines in libXi which support the MT conventions hammered
out here. For example, a routine which skims through events and helps to
associate axis labels to events such that races are prevented. I
wouldn't worry about things not forbidden in the current spec, as MT so
far seems to involve some constraints on how clients interact with the
serer anyway.



More information about the xorg-devel mailing list