[PATCH V3 libinput] evdev: remove checks for fake_resolution

Peter Hutterer peter.hutterer at who-t.net
Thu Jun 25 20:52:46 PDT 2015


On Thu, Jun 25, 2015 at 08:12:36AM -0700, Bill Spitzak wrote:
> 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?

I think you're underestimating the precision of modern touchpads. The T440s
have a resolution of 42 units/mm, the x220 from several years ago had
somewhere around 130. The lowest value I've seen so far was 10.

Cheers,
   Peter
 
> 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