fix crash on windows

This commit is contained in:
Ren Amamiya
2023-09-27 18:24:58 +07:00
parent 74ff49b8db
commit 7cef6efa6f
5 changed files with 12 additions and 4 deletions

View File

@@ -114,14 +114,16 @@ fn main() {
#[cfg(target_os = "macos")]
window.set_transparent_titlebar(true);
#[cfg(target_os = "macos")]
window.position_traffic_lights(16.0, 25.0);
Ok(())
})
.on_window_event(|e| {
#[cfg(target_os = "macos")]
if let WindowEvent::Resized(..) = e.event() {
let window = e.window();
window.position_traffic_lights(16., 25.);
window.position_traffic_lights(16.0, 25.0);
}
})
.plugin(