[PATCH V3 libinput] evdev: remove checks for fake_resolution

Bill Spitzak spitzak at gmail.com
Thu Jun 25 08:12:36 PDT 2015


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, spitzak at gmail.com wrote:
> From: Bill Spitzak <bill.spitzak at dreamworks.com>
>
> (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.




More information about the wayland-devel mailing list