Merge pull request #1738 from nicoburns/update-winit-0.28

Update to winit 0.28
This commit is contained in:
Héctor Ramón 2023-05-25 23:37:14 +02:00 committed by GitHub
commit c61a4cc21c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 78 additions and 45 deletions

View file

@ -140,6 +140,19 @@ pub fn window_event(
}
}
/// Converts a [`window::Level`] to a [`winit`] window level.
///
/// [`winit`]: https://github.com/rust-windowing/winit
pub fn window_level(level: window::Level) -> winit::window::WindowLevel {
match level {
window::Level::Normal => winit::window::WindowLevel::Normal,
window::Level::AlwaysOnBottom => {
winit::window::WindowLevel::AlwaysOnBottom
}
window::Level::AlwaysOnTop => winit::window::WindowLevel::AlwaysOnTop,
}
}
/// Converts a [`Position`] to a [`winit`] logical position for a given monitor.
///
/// [`winit`]: https://github.com/rust-windowing/winit