Skip to content
Commit 80acfe34 authored by Volodymyr Zolotopupov's avatar Volodymyr Zolotopupov Committed by Vlad Zahorodnii
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

(cherry picked from commit 361e2c3e)
parent f40814c3
Pipeline #465217 passed with stage
in 8 minutes and 58 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