From 4b0cc178ddadcb93b1912928631327c3a23c24b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Sun, 12 Apr 2020 00:37:13 +0200 Subject: [PATCH] Produce cursor events in `iced_winit::conversion` --- winit/src/conversion.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs index eaa26ace..78686424 100644 --- a/winit/src/conversion.rs +++ b/winit/src/conversion.rs @@ -27,6 +27,12 @@ pub fn window_event( height: logical_size.height, })) } + WindowEvent::CursorEntered { .. } => { + Some(Event::Mouse(mouse::Event::CursorEntered)) + } + WindowEvent::CursorLeft { .. } => { + Some(Event::Mouse(mouse::Event::CursorLeft)) + } WindowEvent::CursorMoved { position, .. } => { let position = position.to_logical::(scale_factor);