[RFC] Multitouch support, step one

Peter Hutterer peter.hutterer at who-t.net
Tue Mar 16 21:39:08 PDT 2010


On Wed, Mar 17, 2010 at 03:22:20AM +0200, Daniel Stone wrote:
> Hi,
> 
> On Mon, Mar 15, 2010 at 04:56:05PM +1000, Peter Hutterer wrote:
> > Core requires us to always send x/y
> 
> Er, I don't think it does _always_ require it.

It doesn't _require_ it from the driver's POV but we always fill it in for
the events. So we can either make it up in the driver, or fill it in from
cached values in the server. Even XI events always have root x/y set.

> > hence for core emulation we should
> > always include _some_ coordinates that are easily translated. While the
> > server does caching of absolute values, I think it would be worthwile to
> > always have an x/y coordinate _independent of the touchpoints_ in the event.
> > The driver can decide which x/y coordinates are chosen if the first
> > touchpoint becomes invalid.
> 
> Why not just use the first touchpoint for x/y, and when it goes away, no
> more core x/y is sent? Principle of least surprise and all that.

that requires some careful handling of the core events - since some of them
will need to be emulated as button press events too. essentially we need to
ensure that the press and release events are balanced out.
 
Cheers,
  Peter

> > Hence, the example with 4 valuators above becomes a device with 6 valuators
> > instead. x/y and the two coordinate pairs as mentioned above. If extra data
> > is provided by the kernel driver, these pairs are simple extended into
> > tuples of values, appropriately labeled.
> 
> Yep.
> 
> This all looks fine, really, and doesn't require terribly much work.
> Multi-focus multi-touch is a bit further off, but hey, none of us can
> even particularly describe how it should work, so I don't think it's
> such a pressing issue. :)



More information about the xorg-devel mailing list