summaryrefslogtreecommitdiff
path: root/src/filter.h
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-06-23 12:45:16 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-07-02 13:03:43 +1000
commit3928f3228105f65e4ee6186572e3f95f78c96113 (patch)
tree5f1a4c7bd66c09a88bb1d01997e447c4c874baba /src/filter.h
parent4df1a9b66e437a191fab0ef4fc48511e993c4680 (diff)
filter: add a custom low-dpi acceleration
Motion normalization does not work well for devices below the default 1000dpi rate. A 400dpi mouse's minimum movement generates a 2.5 normalized motion, causing it to skip pixels at low speeds even when unaccelerated. Likewise, we don't want 1000dpi mice to be normalized to a 400dpi mouse, it feels sluggish even at higher acceleration speeds. Instead, add a custom acceleration method for lower-dpi mice. At low-speeds, one device unit results in a one-pixel movement. Depending on the DPI factor, the acceleration kicks in earlier and goes to higher acceleration so faster movements with a low-dpi mouse feel approximately the same as the same movement on a higher-dpi mouse. https://bugzilla.redhat.com/show_bug.cgi?id=1231304 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/filter.h b/src/filter.h
index 64a8b50..617fab1 100644
--- a/src/filter.h
+++ b/src/filter.h
@@ -66,6 +66,11 @@ create_pointer_accelerator_filter(accel_profile_func_t filter,
*/
double
+pointer_accel_profile_linear_low_dpi(struct motion_filter *filter,
+ void *data,
+ double speed_in,
+ uint64_t time);
+double
pointer_accel_profile_linear(struct motion_filter *filter,
void *data,
double speed_in,