diff --git a/crates/egui/src/data/input.rs b/crates/egui/src/data/input.rs index d781d243..6b22ee7b 100644 --- a/crates/egui/src/data/input.rs +++ b/crates/egui/src/data/input.rs @@ -214,11 +214,21 @@ pub struct ViewportInfo { /// The inner rectangle of the native window, in monitor space and ui points scale. /// /// This is the content rectangle of the viewport. + /// + /// **`eframe` notes**: + /// + /// On Android / Wayland, this will always be `None` since getting the + /// position of the window is not possible. pub inner_rect: Option, /// The outer rectangle of the native window, in monitor space and ui points scale. /// /// This is the content rectangle plus decoration chrome. + /// + /// **`eframe` notes**: + /// + /// On Android / Wayland, this will always be `None` since getting the + /// position of the window is not possible. pub outer_rect: Option, /// Are we minimized? diff --git a/crates/egui/src/viewport.rs b/crates/egui/src/viewport.rs index d3f1c389..791b34c7 100644 --- a/crates/egui/src/viewport.rs +++ b/crates/egui/src/viewport.rs @@ -543,6 +543,15 @@ impl ViewportBuilder { /// The initial "outer" position of the window, /// i.e. where the top-left corner of the frame/chrome should be. + /// + /// **`eframe` notes**: + /// + /// - **iOS:** Sets the top left coordinates of the window in the screen space coordinate system. + /// - **Web:** Sets the top-left coordinates relative to the viewport. Doesn't account for CSS + /// [`transform`]. + /// - **Android / Wayland:** Unsupported. + /// + /// [`transform`]: https://developer.mozilla.org/en-US/docs/Web/CSS/transform #[inline] pub fn with_position(mut self, pos: impl Into) -> Self { self.position = Some(pos.into());