From bb9b4df587cc9c0a978228455fc8ba8c9cc85c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 17 Jan 2023 14:53:44 +0400 Subject: [PATCH] rdw: round relative mouse motion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- qemu-rdw/src/display.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-rdw/src/display.rs b/qemu-rdw/src/display.rs index e95d6db..0ce1e05 100644 --- a/qemu-rdw/src/display.rs +++ b/qemu-rdw/src/display.rs @@ -93,7 +93,7 @@ mod imp { .connect_motion_relative(clone!(@weak self as this => move |_, dx, dy| { log::debug!("motion-relative: {:?}", (dx, dy)); MainContext::default().spawn_local(clone!(@weak this => async move { - let _ = this.obj().console().mouse.rel_motion(dx as _, dy as _).await; + let _ = this.obj().console().mouse.rel_motion(dx.round() as _, dy.round() as _).await; })); }));