Actually it seems incorrect to store the number of device units per mm as an integer, since I would guess this number is near 1. However I don't know how touchpads work so maybe the resolution is much much finer than I would guess?

To avoid floating point it might work to store the size of the touchpad in mm instead.

On 06/25/2015 08:06 AM, [email protected] wrote:
From: Bill Spitzak <[email protected]>

(changes from previous version: rounds the guess and changes 0 to 1,
removed unused variables)

Instead a default resolution is set if the device does not claim one.
The selected value is a guess that the trackpad is 67 mm tall and
that the device units are square.

This estimate was arrived at by equating the results calculated when
fake_resolution is on or off and computing the ratio of units to
resolution and choosing the most popular value (yres = height / 66.666).

Also fixes an apparent bug in computing motion_dist.scale_coeff, I
believe the fake value was the reciprocal of the intended value.

Unfortunately this patch has not been tested as I lack the ability to do so.
It is unclear to me if the absinfo_x/y->maximum/minimum fields have been
filled in before evdev_fix_abs_resolution is called, this patch
assumes that.


_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to