[PATCH libinput 3/3] Add support for relative device rotation (trackball only)

Peter Hutterer peter.hutterer at who-t.net
Wed May 4 09:20:55 UTC 2016


On Wed, May 04, 2016 at 07:13:43AM +1000, Peter Hutterer wrote:
> Trackballs are effectively stationary devices and can be positioned at any
> rotation. They are also employed by users with impaired dexterity which
> sometimes implies that they are positioned at an non-default angle to make the
> buttons easier to reach.
> 
> Add a config option for rotation for trackball devices. Currently only
> supported for 90-degree angles, if there is a need we can add more angles
> later.
> 
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> I'm not 100% sure yet that this is the feature we should have. Rotation
> itself is important for trackpoints, no doubt, but I'm contemplating whether
> to make this a more generic form like a matrix. It makes decisions of
> precedence a lot easier, especially if we need to add other options later
> that may overlap or conflict with rotation (admittedly, it just shifts that
> decision to the caller). but a matrix can also be misused easier and makes
> it harder for libinput to detect what the caller wants to do. while this
> doesn't have a use-case yet for this feature, sometimes knowing what the
> caller wants to do allows us to modify other features.

a few notes from my meeting with Benjamin today:
if we expose the matrix, what would we gain: immediate support for
translation, shearing, scaling and reflection. translation and shearing make
no sense for relative devices. scaling is effectively only a way to work
around/against pointer acceleration and we don't want to enable that.
reflection *could* be interesting but we failed to come up with a reasonable
use-case where it is needed on relative devices.

so it looks like this API is indeed the best approach.

Cheers,
   Peter


More information about the wayland-devel mailing list