diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2015-03-13 13:56:14 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2015-03-17 15:13:55 +1000 |
commit | 522a42e9b45164d6dcb1f7e2c9535e8f4349ecdf (patch) | |
tree | a46964b7946c6628b7c5de4d890a316f7837bc3b /src/filter.h | |
parent | 99d0c743f4fa3149f6ae0ef38edc22067cde86b7 (diff) | |
download | libinput-522a42e9b45164d6dcb1f7e2c9535e8f4349ecdf.tar.gz |
Push the touchpad magic slowdown to the touchpad accel code
This way the unaccelerated deltas returned by libinput are correct.
To maintain the current behavior we slow down the input speed by the magic
factor and likewise the accelerated output speed. This produces virtually the
same accelerated deltas as the previous code.
The magic factor is applied to the default denominator for guessing a
resolution based on the touchpad diagonal. We can't really get around this
without having a resolution from the touchpad; meanwhile this produces
virtually the same coordinates before/after.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/filter.h')
-rw-r--r-- | src/filter.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filter.h b/src/filter.h index 9e903303..f23b691b 100644 --- a/src/filter.h +++ b/src/filter.h @@ -64,4 +64,9 @@ pointer_accel_profile_linear(struct motion_filter *filter, void *data, double speed_in, uint64_t time); +double +touchpad_accel_profile_linear(struct motion_filter *filter, + void *data, + double speed_in, + uint64_t time); #endif /* FILTER_H */ |