libinput: proposed patch to remove fake_resolution tests

Bill Spitzak spitzak at gmail.com
Wed Jun 24 12:11:32 PDT 2015


Oops.

Updated patch to remove an obvious error (I used the inverse of the ratio).
Also changed to assume the device units are square and thus the resolution
is the same in both directions, rather than guessing as to the shape of the
device. And fixed some incorrect replacement of tab with spaces.

On Wed, Jun 24, 2015 at 11:38 AM, Bill Spitzak <spitzak at gmail.com> wrote:

> Searching for uses of fake_resolution and equating the two results gives
> scale factors between resolution and the controller range (called width and
> height here):
>
> evdev-mt-touchpad-buttons.c:535 bottom_area.top_edge
>
>         height * 0.15 / yres <= 10 (to choose the same branch as fake does
> now)
>         yres * 10 >= height * 0.15
>         yres >= height / 66.66
>
> evdev-mt-touchpad-buttons.c:572 top_area.bottom_edge
>
>         yoffset + topsize_mm * yres == height * topsize_pct + yoffset
>         yres * topsize_mm == height * topsize_pct
>         yres * 10 * topbutton_size_mult == height * .15 *
> topbutton_size_mult
>         yres * 10 = height * .15
>         yres = height / 66.66
>
> evdev-mt-touchpad-buttons.c:743 motion_dist.scale_coeff
>
>         diagonal * BUTTON_MOTION_MAGIC == 1/xres == 1/yres
>         1/xres == 1/yres == diagonal * 0.007
>         (This is inverted! Correct for assumed mistake:)
>         xres == yres == diagonal * 0.007
>         (assume touchpad is 4x3. Then width == diagonal * 4/5 and height
> == diagonal * 3/5)
>         xres = width / 114.28
>         yres = height / 85.71
>
> evdev-mt-touchpad-buttons.c:836 clickfinger_distance
>
>         width * 0.3 == xres * 40 (equate the two things x is compared with)
>         xres = width * 0.3 / 40
>         xres = width / 133.33
>
>         height * 0.3 == yres * 20 (equate the two things y is compared
> with)
>         yres = height * 0.3 / 20
>         yres = height / 66.667
>
> evdev-mt-touchpad.c:1285 accel.scale_coeff
>
>         (DEFAULT_MOUSE_DPI/25.4) / xres == DEFAULT_ACCEL_NUMERATOR /
> diagonal (same for yres)
>         (1000/25.4) / xres == 3000 / diagonal
>         xres = yres = diagonal * (1000 / 25.4 / 3000)
>         (assume same 4x3 aspect of touchpad as above)
>         xres = width / 91.5
>         yres = height / 68.625
>
> evdev-mt-touchpad.c:1497 hysteresis_margin
>
>         xres / 2 == diagonal / DEFAULT_HYSTERESIS_MARGIN_DENOMINAOTR (same
> for yres)
>         xres / 2 = diagonal / 700
>         xres = diagonal / 350
>         (assume same 4x3 aspect of touchpad as above)
>         xres = width / 280
>         yres = height / 210
>         (this seems to be an out-liner and probably should be ignored)
>
> Most popular height divisor is 66.667. This makes sense as it is a 6.6cm
> tall touch pad.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150624/b4f7acba/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libinput-remove-checks-for-fake_resolution.patch
Type: text/x-patch
Size: 8895 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20150624/b4f7acba/attachment.bin>


More information about the wayland-devel mailing list