diff --git a/Cargo.toml b/Cargo.toml index 2416312db..56a0646ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ rand = { version = "0.7.3", features = ["wasm-bindgen"] } # FIXME: Untrusted dependency, 0.2.x doesn't compile with cache middleware reqwest-middleware = "0.1.6" -winit = { version = "0.29.15", default-features = false, features = ["rwh_06"] } +winit = { version = "0.30", default-features = false, features = ["rwh_06"] } # # These dependencies should be updated to the latest version diff --git a/maplibre-winit/src/noweb.rs b/maplibre-winit/src/noweb.rs index 1178326ed..121949f80 100644 --- a/maplibre-winit/src/noweb.rs +++ b/maplibre-winit/src/noweb.rs @@ -18,7 +18,7 @@ use maplibre::{ style::Style, window::{MapWindow, MapWindowConfig, PhysicalSize}, }; -use winit::window::WindowBuilder; +use winit::window::WindowAttributes; use super::WinitMapWindow; use crate::{WinitEnvironment, WinitEventLoop}; @@ -73,8 +73,7 @@ impl MapWindowConfig for WinitMapWindowConfig { type MapWindow = WinitMapWindow; fn create(&self) -> Self::MapWindow { - let mut raw_event_loop_builder = - winit::event_loop::EventLoopBuilder::::with_user_event(); + let mut raw_event_loop_builder = winit::event_loop::EventLoop::::with_user_event(); #[cfg(target_os = "android")] use winit::platform::android::EventLoopBuilderExtAndroid; @@ -84,10 +83,9 @@ impl MapWindowConfig for WinitMapWindowConfig { let raw_event_loop = raw_event_loop_builder.build().unwrap(); // TODO - let window = WindowBuilder::new() - .with_title(&self.title) - .build(&raw_event_loop) - .unwrap(); + let window = raw_event_loop + .create_window(WindowAttributes::new().with_title(&self.title)) + .unwrap(); // todo Self::MapWindow { window,