Skip to content
Commit 361e2c3e authored by Volodymyr Zolotopupov's avatar Volodymyr Zolotopupov
Browse files

wayland: Fix high-resolution scroll wheel discrete step calculation

Some wheels might send fewer or more than 120 fractions per step.
In order to always register a discrete step, we count these as a step
already at half(120/2) of one mouse wheel step in stepping mode.
The timer resets the initial value of the step because the mouse
can switch between free spin and stepping mode.
When transitioning from free spin to stepping mode,
the mouse calibrates its wheel position to the starting point
and generates some fractions.
As a result, our starting position can appear far from the zero point,
potentially causing us to count two(or zero) steps instead of one.
Additionally, the compositor might start when the mouse is in
free spin mode(or the mouse could be connected in free spin mode),
leading to the same issue.
https://gitlab.freedesktop.org/libinput/libinput/-/issues/814
parent 792ff844
Pipeline #464866 passed with stage
in 12 minutes and 22 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment