From bd5da261eb584fd40e0b1e1609d7db5faa0ae517 Mon Sep 17 00:00:00 2001 From: Alex Mirrlees-Black Date: Tue, 23 Apr 2024 23:28:42 +1000 Subject: [PATCH] input: fix scroll-factor resetting if unspecified --- river/InputConfig.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/river/InputConfig.zig b/river/InputConfig.zig index 09250d7..8c5e022 100644 --- a/river/InputConfig.zig +++ b/river/InputConfig.zig @@ -256,7 +256,9 @@ pub const ScrollFactor = struct { value: ?f32 = null, fn apply(scroll_factor: ScrollFactor, device: *InputDevice) void { - device.config.scroll_factor = scroll_factor.value orelse 1.0; + if (scroll_factor.value) |value| { + device.config.scroll_factor = value; + } } };