Skip to content

Commit

Permalink
Produce cursor events in iced_winit::conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Apr 11, 2020
1 parent e941eab commit 4b0cc17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions winit/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<f64>(scale_factor);

Expand Down

0 comments on commit 4b0cc17

Please sign in to comment.