Add CloseRequested variant to window::Event

This commit is contained in:
Héctor Ramón Jiménez 2021-03-30 21:33:57 +02:00
parent bbb4e4678f
commit 00de9d0c9b
2 changed files with 9 additions and 0 deletions

View file

@ -33,6 +33,9 @@ pub fn window_event(
height: logical_size.height,
}))
}
WindowEvent::CloseRequested => {
Some(Event::Window(window::Event::CloseRequested))
}
WindowEvent::CursorMoved { position, .. } => {
let position = position.to_logical::<f64>(scale_factor);