aboutsummaryrefslogtreecommitdiff
path: root/src/protocols
diff options
context:
space:
mode:
authorFerdinand Schober <ferdinandschober20@gmail.com>2025-11-17 06:47:22 +0100
committerGitHub <noreply@github.com>2025-11-17 08:47:22 +0300
commit08fbdef60e17f57afd627a97060d33ef0ebd9da7 (patch)
tree5de7845758da4bddaa828408e9a98019fb1f1ba1 /src/protocols
parentaecbd679e39a321495964995fa1e37d84bd91ddf (diff)
downloadniri-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
Diffstat (limited to 'src/protocols')
-rw-r--r--src/protocols/virtual_pointer.rs2
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 => {}