[PATCH libinput] tablet: invert tilt axes when left-handed is enabled

Bill Spitzak spitzak at gmail.com
Mon Dec 21 14:44:03 PST 2015


On Mon, Dec 21, 2015 at 1:24 PM, Peter Hutterer <peter.hutterer at who-t.net>
wrote:

> On Mon, Dec 21, 2015 at 10:12:24AM -0800, Bill Spitzak wrote:
> > I find it hard to believe this is what client programs will want.  A
> > painting program wants the axis of an elongated brush to be perpendicular
> > to the tilt will work correctly only if *both* axes are flipped (as your
> > code appears to be doing). But it will get "which edge is nearer"
> backward
> > if it wants to draw something asymmetric in the direction the pen is
> > tilted. And it also seems to make little sense to flip the vertical tilt
> > for a left-handed user.
> >
> > Or are you perhaps undoing some flip that the tablet is doing internally?
>
> a tablet in left-handed mode is effectively rotated by 180 degrees to bring
> the set of buttons towards the side of the nondominant hand. this inverts x
> and y, if we don't also invert tilt the client program will think that the
> pen is tilted in the opposite direction.
>
> symmetrical tablets don't have a left-handed mode.
>
> That makes sense. I assume the condition that triggers this is exactly the
same as the one that triggers the x and y axis to be inverted, right?

You might also need to check whether z-axis rotation is correct (ie is the
zero in the right direction).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20151221/e787f7de/attachment-0001.html>


More information about the wayland-devel mailing list