From e794de5ffa387b7275462b539f0b4da99f29c0e5 Mon Sep 17 00:00:00 2001 From: Luke M <44519853+lkdm@users.noreply.github.com> Date: Tue, 12 Aug 2025 20:35:45 +1000 Subject: [PATCH] Document platform compatibility on `viewport::WindowLevel` and dependents (#7432) Documents platform compatibility on the WindowLevel struct and some of the methods that are dependent on it. Provides a link to `winit::window::WindowLevel` documentation section that provides a list of which platforms are supported. * Closes [Issue 7419](https://github.com/emilk/egui/issues/7419) * [x] I have followed the instructions in the PR template --------- Co-authored-by: Emil Ernerfeldt --- crates/egui/src/viewport.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/egui/src/viewport.rs b/crates/egui/src/viewport.rs index bcbb04a7..1e5f4612 100644 --- a/crates/egui/src/viewport.rs +++ b/crates/egui/src/viewport.rs @@ -630,6 +630,8 @@ impl ViewportBuilder { } /// Control if window is always-on-top, always-on-bottom, or neither. + /// + /// For platform compatibility see [`crate::viewport::WindowLevel`] documentation #[inline] pub fn with_window_level(mut self, level: WindowLevel) -> Self { self.window_level = Some(level); @@ -637,6 +639,8 @@ impl ViewportBuilder { } /// This window is always on top + /// + /// For platform compatibility see [`crate::viewport::WindowLevel`] documentation #[inline] pub fn with_always_on_top(self) -> Self { self.with_window_level(WindowLevel::AlwaysOnTop) @@ -898,6 +902,7 @@ impl ViewportBuilder { } } +/// For winit platform compatibility, see [`winit::WindowLevel` documentation](https://docs.rs/winit/latest/winit/window/enum.WindowLevel.html#platform-specific) #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub enum WindowLevel {