[PATCHv2] dix: add 3x3 transformation matrix xinput property for multi-head handling

Éric Piel E.A.B.Piel at tudelft.nl
Thu May 6 07:58:22 PDT 2010


Op 06-05-10 16:34, Peter Korsgaard schreef:
> For absolute input devices (E.G. touchscreens) in multi-head setups,
> we need a way to bind the device to an randr output. This adds the
> infrastructure to the server to allow us to do so.
> 
> positionSprite() scales input coordinates to the dimensions of the shared
> (total) screen frame buffer, so to restrict motion to an output we need to
> scale/rotate/translate device coordinates to a subset of the frame buffer
> before passing them on to positionSprite.
> 
> This is done here using a 3x3 transformation matrix, which is applied to
> the device coordinates using homogeneous coordinates, E.G.:
> 
> [ c0 c1 c2 ]   [ x ]
> [ c3 c4 c5 ] * [ y ]
> [ c6 c7 c8 ]   [ 1 ]
> 
Hi,
I really like the idea of the patch. Do I understand correctly that the
transformation applies only to absolute input devices?

If so, it would still be a nice step towards allowing rotation of
touchpads (and other relative devices), as described in this bug:
http://bugs.freedesktop.org/show_bug.cgi?id=21129

It would only require to find the best way to apply the matrix on the
values received from relative devices, right?

Cheers,
Eric


More information about the xorg-devel mailing list