mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Don't restore window settings if they were fullscreen on macos
This commit is contained in:
@@ -60,6 +60,13 @@ impl WindowSettings {
|
|||||||
mut viewport_builder: ViewportBuilder,
|
mut viewport_builder: ViewportBuilder,
|
||||||
) -> ViewportBuilder {
|
) -> ViewportBuilder {
|
||||||
profiling::function_scope!();
|
profiling::function_scope!();
|
||||||
|
// On MacOS with an external monitor, if the window starts fullscreen,
|
||||||
|
// the top area is not clickable. See https://github.com/rust-windowing/winit/issues/4295
|
||||||
|
let top_area_not_clickable_workaround =
|
||||||
|
cfg!(target_os = "macos") && !cfg!(feature = "accesskit");
|
||||||
|
if top_area_not_clickable_workaround && self.fullscreen {
|
||||||
|
return viewport_builder;
|
||||||
|
}
|
||||||
|
|
||||||
// `WindowBuilder::with_position` expects inner position in Macos, and outer position elsewhere
|
// `WindowBuilder::with_position` expects inner position in Macos, and outer position elsewhere
|
||||||
// See [`winit::window::WindowBuilder::with_position`] for details.
|
// See [`winit::window::WindowBuilder::with_position`] for details.
|
||||||
|
|||||||
Reference in New Issue
Block a user