diff options
| author | Ferdinand Schober <ferdinandschober20@gmail.com> | 2025-11-17 06:47:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-17 08:47:22 +0300 |
| commit | 08fbdef60e17f57afd627a97060d33ef0ebd9da7 (patch) | |
| tree | 5de7845758da4bddaa828408e9a98019fb1f1ba1 | |
| parent | aecbd679e39a321495964995fa1e37d84bd91ddf (diff) | |
| download | niri-08fbdef60e17f57afd627a97060d33ef0ebd9da7.tar.gz niri-08fbdef60e17f57afd627a97060d33ef0ebd9da7.tar.bz2 niri-08fbdef60e17f57afd627a97060d33ef0ebd9da7.zip | |
virtual_pointer: fix multiplier for axis_discrete (#2684)
The virtual-pointer protocol accepts discrete scroll events, not axis-value120.
Therefore the value received from a client must be multiplied by 120 before
being handed to mutate_axis_frame.
https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/879243e370de6167d2c49510396f937b1a93fab5/types/wlr_virtual_pointer_v1.c#L183
https://github.com/feschber/lan-mouse/issues/318
https://github.com/feschber/lan-mouse/pull/325
https://github.com/feschber/lan-mouse/issues/329
| -rw-r--r-- | src/protocols/virtual_pointer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocols/virtual_pointer.rs b/src/protocols/virtual_pointer.rs index ff3cb3e9..4ecc85ab 100644 --- a/src/protocols/virtual_pointer.rs +++ b/src/protocols/virtual_pointer.rs @@ -519,7 +519,7 @@ where } }; pointer.mutate_axis_frame(Some(time), |frame| { - frame.value(axis, value).v120(axis, discrete) + frame.value(axis, value).v120(axis, discrete * 120) }); } zwlr_virtual_pointer_v1::Request::Destroy => {} |
