diff --git a/crates/egui-winit/src/lib.rs b/crates/egui-winit/src/lib.rs index 1980376b97a..a78339d01fe 100644 --- a/crates/egui-winit/src/lib.rs +++ b/crates/egui-winit/src/lib.rs @@ -36,7 +36,14 @@ use winit::{ }; pub fn screen_size_in_pixels(window: &Window) -> egui::Vec2 { - let size = window.inner_size(); + let size = if cfg!(target_os = "ios") { + // `outer_size` Includes the area behind the "dynamic island". + // It is up to the eframe user to make sure the dynamic island doesn't cover anything important. + // That will be easier once https://github.com/rust-windowing/winit/pull/3890 lands + window.outer_size() + } else { + window.inner_size() + }; egui::vec2(size.width as f32, size.height as f32) }