mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-04 10:30:28 +01:00
filter: always init a delta smoothener for 10/10ms on trackpoints
If the trackpoint gives us deltas with less than 10ms intervals, something is wrong. Could be bad hardware, a glitch in the matrix or a discontinuity in the otherwise appropriately named time-space continuum. Usually it's the first. Let's always set up trackpoint delta smoothening for 10ms to improve the pointer speed calculation and avoid jerky behaviors. i.e. if a trackpoint delta comes in below 10ms, pretend it came in with a 10ms interval for calculating the speed. Fixes https://gitlab.freedesktop.org/libinput/libinput/issues/104 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
82f3e77fb2
commit
77f9a47996
1 changed files with 6 additions and 0 deletions
|
|
@ -185,6 +185,7 @@ struct motion_filter *
|
|||
create_pointer_accelerator_filter_trackpoint(double multiplier)
|
||||
{
|
||||
struct trackpoint_accelerator *filter;
|
||||
struct pointer_delta_smoothener *smoothener;
|
||||
|
||||
assert(multiplier > 0.0);
|
||||
|
||||
|
|
@ -210,5 +211,10 @@ create_pointer_accelerator_filter_trackpoint(double multiplier)
|
|||
|
||||
filter->base.interface = &accelerator_interface_trackpoint;
|
||||
|
||||
smoothener = zalloc(sizeof(*smoothener));
|
||||
smoothener->threshold = ms2us(10);
|
||||
smoothener->value = ms2us(10);
|
||||
filter->trackers.smoothener = smoothener;
|
||||
|
||||
return &filter->base;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue