diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 5d9221e9..88ffd6d6 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -188,8 +188,15 @@ where let mut messages = Vec::new(); for event in events { - if let Event::Mouse(mouse::Event::CursorMoved { x, y }) = event { - self.cursor_position = Point::new(x, y); + match event { + Event::Mouse(mouse::Event::CursorMoved { x, y }) => { + self.cursor_position = Point::new(x, y); + } + Event::Mouse(mouse::Event::CursorLeft) => { + // TODO: Encode cursor availability + self.cursor_position = Point::new(-1.0, -1.0); + } + _ => {} } self.root.widget.on_event(