[PATCH libinput 5/7] tablet: add support for relative x/y motion deltas

Peter Hutterer peter.hutterer at who-t.net
Mon Jan 18 13:57:43 PST 2016


On Mon, Jan 18, 2016 at 09:54:09AM -0800, Bill Spitzak wrote:
> On 01/17/2016 02:26 PM, Peter Hutterer wrote:
> >On Fri, Jan 15, 2016 at 12:06:27PM -0800, Bill Spitzak wrote:
> >>Isn't dx_unaccelerated exactly equal to the differences between x values?
> >
> >hah, yes. indeed. that actually means we can drop it from the API since a
> >client can use the mm value instead, they are effectively equivalent (but
> >more useful) than the raw device coordinates and account for uneven
> >resolution better anyway.
> 
> I think the following text is confusing and is what led me to think that the
> coordinate systems might be different:
> 
> >>> +libinput calculates the relative motion vector for each event and
> converts
> >>> +it to the same coordinate space that a normal mouse device would use.
> 
> I guess that all coordianates except for raw ones are "converted to the
> space that a normal mouse device would use" but this seems to imply that
> dx/dy are special. Maybe this text can be moved somewhere to make it clear
> it applies to everything other than raw output.

Please send a patch rewording/moving this.

> >Whether you use the device in an absolute or relative mode is a very
> >user-specific thing, I doubt you can handle this automatically. mode is also
> >a very tool-specific thing, you may want the mouse to be in relative mode
> >but the pen in absolute mode.
> 
> Although some devices such as the mouse may want to be in relative mode all
> the time, I believe the "absolute" devices will want to be in relative mode
> if the mapping from the tablet to the screen is either too large of a
> scale-up (ie the screen is much larger than the tablet) or the aspect ratio
> is significantly different (though this might just mean that one dimension
> is scaled beyond a maximum). This is certainly true of my current setup and
> I can't believe it is uncommon. Absolute mode on this tablet is completely
> useless! Except for programs that restrict the motion to a smaller window
> that is about the shape of the tablet.
> 
> I think this would also help it guess the correct mode automatically when
> the user changes their tablet or their screens.

mapping aspect ratio will be the job of the compositor. In reality, this
will mean that one of the axes will be shortened to match the ratio.
if absolute mode on your tablet is "completely useless" that would indicate
you never looked at wacom(4) or any instructions on how to fix this. We've
had config options to adjust this for years.
 
Cheers,
   Peter



More information about the wayland-devel mailing list