diff --git a/input-capture/src/windows.rs b/input-capture/src/windows.rs index 76fd57e..bfbf6c3 100644 --- a/input-capture/src/windows.rs +++ b/input-capture/src/windows.rs @@ -145,11 +145,7 @@ fn to_mouse_event(wparam: WPARAM, lparam: LPARAM) -> Option { let (ex, ey) = ENTRY_POINT; let (dx, dy) = (x - ex, y - ey); let (dx, dy) = (dx as f64, dy as f64); - Some(PointerEvent::Motion { - time: 0, - dx: dx as f64, - dy: dy as f64, - }) + Some(PointerEvent::Motion { time: 0, dx, dy }) }, WPARAM(p) if p == WM_MOUSEWHEEL as usize => Some(PointerEvent::AxisDiscrete120 { axis: 0, diff --git a/input-emulation/src/libei.rs b/input-emulation/src/libei.rs index 6dc92a0..824fe4b 100644 --- a/input-emulation/src/libei.rs +++ b/input-emulation/src/libei.rs @@ -115,8 +115,8 @@ impl LibeiEmulation { .await?; let events = EiConvertEventStream::new(events, handshake.serial); let devices = Devices::default(); - let ei_task = - tokio::task::spawn_local(ei_event_handler(events, context.clone(), devices.clone())); + let ei_handler = ei_event_handler(events, context.clone(), devices.clone()); + let ei_task = tokio::task::spawn_local(ei_handler); let serial = AtomicU32::new(handshake.serial);