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

Peter Hutterer peter.hutterer at who-t.net
Sun Jan 3 21:27:35 PST 2016


On Mon, Dec 21, 2015 at 02:44:03PM -0800, Bill Spitzak wrote:
> 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).

sorry about the delay: yeah, you're right, I've added this to my todo list.

Cheers,
   Peter


More information about the wayland-devel mailing list