File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,7 @@ pub struct WindowAttributesMacOS {
341341 pub ( crate ) borderless_game : bool ,
342342 pub ( crate ) unified_titlebar : bool ,
343343 pub ( crate ) panel : bool ,
344+ pub ( crate ) simple_fullscreen : bool ,
344345}
345346
346347impl WindowAttributesMacOS {
@@ -437,6 +438,12 @@ impl WindowAttributesMacOS {
437438 self
438439 }
439440
441+ /// See [`WindowExtMacOS::set_simple_fullscreen`] for details on what this means if set.
442+ pub fn with_simple_fullscreen ( mut self , simple_fullscreen : bool ) -> Self {
443+ self . simple_fullscreen = simple_fullscreen;
444+ self
445+ }
446+
440447 /// Use [`NSPanel`] window with [`NonactivatingPanel`] window style mask instead of
441448 /// [`NSWindow`].
442449 ///
@@ -468,6 +475,7 @@ impl Default for WindowAttributesMacOS {
468475 borderless_game : false ,
469476 unified_titlebar : false ,
470477 panel : false ,
478+ simple_fullscreen : false ,
471479 }
472480 }
473481}
Original file line number Diff line number Diff line change @@ -847,6 +847,8 @@ impl WindowDelegate {
847847 // Set fullscreen mode after we setup everything
848848 delegate. set_fullscreen ( attrs. fullscreen ) ;
849849
850+ delegate. set_simple_fullscreen ( macos_attrs. simple_fullscreen ) ;
851+
850852 // Setting the window as key has to happen *after* we set the fullscreen
851853 // state, since otherwise we'll briefly see the window at normal size
852854 // before it transitions.
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ on how to add them:
1616- On X11, add `Window::even_more_rare_api`.
1717- On Wayland, add `Window::common_api`.
1818- On Windows, add `Window::some_rare_api`.
19+ - On macOS, add `WindowAttributesMacOS::with_simple_fullscreen`.
1920```
2021
2122When the change requires non-trivial amount of work for users to comply
You can’t perform that action at this time.
0 commit comments