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
This commit is contained in:
Ferdinand Schober
2025-11-17 06:47:22 +01:00
committed by GitHub
parent aecbd679e3
commit 08fbdef60e
+1 -1
View File
@@ -519,7 +519,7 @@ where
} }
}; };
pointer.mutate_axis_frame(Some(time), |frame| { 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 => {} zwlr_virtual_pointer_v1::Request::Destroy => {}