• Peter Hutterer's avatar
    filter: change the filter functions to take raw device coordinates · bdd4264d
    Peter Hutterer authored
    We used to normalize all deltas to equivalents of a 1000dpi mouse before
    passing it into the acceleration functions. This has a bunch of drawbacks, not
    least that we already have to un-normalize back into device units for a few
    devices already (trackpoints, tablet, low-dpi mice).
    Switch the filter code over to use device units, relying on the dpi set
    earlier during filter creation to convert to normalized. To make things easy,
    the output of the filter code is still normalized data, i.e. data ready to be
    handed to the libinput caller.
    No effective functional changes. For touchpads, we still send normalized
    coordinates (for now, anyway). For the various filter methods, we either drop
    the places where we unnormalized before or we normalize where needed.
    Two possible changes: for trackpoints and low-dpi mice we had a max dpi factor
    of 1.0 before - now we don't anymore. This was only the case if a low-dpi
    mouse had more than 1000dpi (never true) or a trackpoint had a const accel
    lower than 1.0 (yeah, whatever).
    Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
filter-private.h 1.95 KB