From 2235204a9db333fe513bde502b8c8d044cf74d3c Mon Sep 17 00:00:00 2001 From: Andri Date: Mon, 10 Jun 2024 22:02:52 +0200 Subject: [PATCH] Renamed all references to winit WindowBuilder to WindowAttributes --- crates/egui-winit/src/lib.rs | 4 ++-- crates/egui-winit/src/window_settings.rs | 6 +++--- crates/egui/src/viewport.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index d7802792696..72df0f5700f 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -1533,7 +1533,7 @@ pub fn create_window( let window_attributes = create_winit_window_attributes(egui_ctx, event_loop, viewport_builder.clone()); let window = { - crate::profile_scope!("WindowBuilder::build"); + crate::profile_scope!("WindowAttributes::build"); event_loop.create_window(window_attributes)? }; apply_viewport_builder_to_window(egui_ctx, &window, viewport_builder); @@ -1709,7 +1709,7 @@ pub fn create_winit_window_attributes( #[cfg(target_os = "macos")] { - use winit::platform::macos::WindowBuilderExtMacOS as _; + use winit::platform::macos::WindowAttributesExtMacOS as _; window_attributes = window_attributes .with_title_hidden(!_title_shown.unwrap_or(true)) .with_titlebar_buttons_hidden(!_titlebar_buttons_shown.unwrap_or(true)) diff --git a/crates/egui-winit/src/window_settings.rs b/crates/egui-winit/src/window_settings.rs index 627d88158c0..539a49f9b4f 100644 --- a/crates/egui-winit/src/window_settings.rs +++ b/crates/egui-winit/src/window_settings.rs @@ -58,8 +58,8 @@ impl WindowSettings { ) -> ViewportBuilder { crate::profile_function!(); - // `WindowBuilder::with_position` expects inner position in Macos, and outer position elsewhere - // See [`winit::window::WindowBuilder::with_position`] for details. + // `WindowAttributes::with_position` expects inner position in Macos, and outer position elsewhere + // See [`winit::window::WindowAttributes::with_position`] for details. let pos_px = if cfg!(target_os = "macos") { self.inner_position_pixels } else { @@ -89,7 +89,7 @@ impl WindowSettings { pub fn initialize_window(&self, window: &winit::window::Window) { if cfg!(target_os = "macos") { // Mac sometimes has problems restoring the window to secondary monitors - // using only `WindowBuilder::with_position`, so we need this extra step: + // using only `WindowAttributes::with_position`, so we need this extra step: if let Some(pos) = self.outer_position_pixels { window.set_outer_position(winit::dpi::PhysicalPosition { x: pos.x, y: pos.y }); } diff --git a/crates/egui/src/viewport.rs b/crates/egui/src/viewport.rs index 9dd71b4747b..c1dbb14c0bd 100644 --- a/crates/egui/src/viewport.rs +++ b/crates/egui/src/viewport.rs @@ -534,7 +534,7 @@ impl ViewportBuilder { /// See [winit's documentation][drag_and_drop] for information on why you /// might want to disable this on windows. /// - /// [drag_and_drop]: https://docs.rs/winit/latest/x86_64-pc-windows-msvc/winit/platform/windows/trait.WindowBuilderExtWindows.html#tymethod.with_drag_and_drop + /// [drag_and_drop]: https://docs.rs/winit/latest/x86_64-pc-windows-msvc/winit/platform/windows/trait.WindowAttributesExtWindows.html#tymethod.with_drag_and_drop #[inline] pub fn with_drag_and_drop(mut self, value: bool) -> Self { self.drag_and_drop = Some(value);