Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git
libinput-config: fix set_accel_speed type
This should have always been a double. This is a bit awkward as it
breaks existing users but the protocol specifies a double and this
is clearly a river bug/typo.
river/LibinputDevice.zig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/river/LibinputDevice.zig b/river/LibinputDevice.zig
index a2a15ef..c6d716d 100644
--- a/river/LibinputDevice.zig
+++ b/river/LibinputDevice.zig
@@ -329,11 +329,11 @@ fn handleRequest(
}
},
.set_accel_speed => |args| {
- if (args.speed.size != @sizeOf(f32)) {
+ if (args.speed.size != @sizeOf(f64)) {
object.postError(.invalid_arg, "invalid accel speed");
return;
}
- const speed = args.speed.slice(f32)[0];
+ const speed = args.speed.slice(f64)[0];
const result = Result.create(object, args.result) orelse return;
const status = c.libinput_device_config_accel_set_speed(device.libinput, speed);
if (result.send(status)) {