From db94324b912e1fc44bd8161e1e9633109c681f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n?= Date: Mon, 17 Aug 2020 23:37:02 +0200 Subject: [PATCH] Use proposed fullscreen options in `window_delegate` --- src/platform_impl/macos/window_delegate.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/platform_impl/macos/window_delegate.rs b/src/platform_impl/macos/window_delegate.rs index fb6df1b4514..9d464d53ed0 100644 --- a/src/platform_impl/macos/window_delegate.rs +++ b/src/platform_impl/macos/window_delegate.rs @@ -285,25 +285,8 @@ declare_class!( proposed_options: NSApplicationPresentationOptions, ) -> NSApplicationPresentationOptions { trace_scope!("window:willUseFullScreenPresentationOptions:"); - // Generally, games will want to disable the menu bar and the dock. Ideally, - // this would be configurable by the user. Unfortunately because of our - // `CGShieldingWindowLevel() + 1` hack (see `set_fullscreen`), our window is - // placed on top of the menu bar in exclusive fullscreen mode. This looks - // broken so we always disable the menu bar in exclusive fullscreen. We may - // still want to make this configurable for borderless fullscreen. Right now - // we don't, for consistency. If we do, it should be documented that the - // user-provided options are ignored in exclusive fullscreen. - let mut options = proposed_options; - let shared_state = self - .window - .lock_shared_state("window_will_use_fullscreen_presentation_options"); - if let Some(Fullscreen::Exclusive(_)) = shared_state.fullscreen { - options = NSApplicationPresentationOptions::NSApplicationPresentationFullScreen - | NSApplicationPresentationOptions::NSApplicationPresentationHideDock - | NSApplicationPresentationOptions::NSApplicationPresentationHideMenuBar; - } - options + proposed_options } /// Invoked when entered fullscreen