Commit graph

7 commits

Author SHA1 Message Date
Peter Hutterer
108a191a3e tablet: add support for relative x/y motion deltas
Instead of an explicit tablet mode that device must be changed into, let the
caller decide which coordinates are preferred. The tablet mode may be
application-specific and usually depends on the tool as well.

This patch adds an interface to get a motion delta for the x/y axes in
pixel-like coordinates. libinput provides some magic to convert the tablet
data into something that resembles pixels from a mouse motion.
For unaccelerated relative motion, the caller should use the mm values from
the tablet and calculate deltas manually.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Jason Gerecke <jason.gerecke@wacom.com>
2016-01-22 16:16:55 +10:00
Peter Hutterer
41cc9053dd doc: add section names to motion normalization subheaders
Otherwise the first word is used as section header and discarded from the
output.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2016-01-13 14:11:28 +10:00
Peter Hutterer
5311d76ec1 doc: fix typos
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-08-17 16:26:43 +10:00
Peter Hutterer
9129a20014 doc: add "mouse is too fast" to the FAQ
And reference libevdev's mouse-dpi-tool while we're at it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-07-07 07:41:03 +10:00
Peter Hutterer
c06d825c53 Drop motion normalization of unaccelerated deltas
This simply doesn't work for low-dpi mice. Normalizing a 400dpi mouse to a
1000dpi mouse forces a minimum movement of 2.5 units and the resulting pixel
jumps. It is impossible for the caller to detect whether the jump was caused
by a single motion or multiple motion events.

This is technically an API break, but not really.

The accelerated data was already relatively meaningless, even if normalized as
the data did not correspond predictably to any input motion (unless you know
the implementation acceleration function in the caller). So we can drop the
mention from there without expecting any ill effects in the caller.

The unaccelerated data was useless for low-dpi mice and could only be used to
measure the physical distance of the mouse movement - something not used in
any caller we're aware of (if needed, we can add that functionality as a
separate call). Dropping motion normalization for unaccelerated deltas also
restores true dpi capabilities to users of that API, mostly games that want to
make use of high-dpi mice.

This is a simplified patch, the normalization is still in place for most of
libinput, it merely carries the original coordinates in the event itself.

In the case of touchpads, the coordinates are unnormalized into the x-axis
coordinate space as per the documentation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-02 13:03:43 +10:00
Peter Hutterer
700ec897eb doc: add link to udev hwdb in rel motion normalization doc
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-23 08:15:00 +10:00
Peter Hutterer
5c63a73970 doc: move relative motion normalization page over to doc/
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-22 12:53:23 +10:00