Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,18 @@ pub struct Window {
///
/// [`WindowAttributesExtMacOS::with_titlebar_buttons_hidden`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/macos/trait.WindowAttributesExtMacOS.html#tymethod.with_titlebar_buttons_hidden
pub titlebar_show_buttons: bool,
/// Hides the dock and menu bar when a borderless fullscreen window is active.
///
/// Corresponds to [`WindowAttributesExtMacOS::with_borderless_game`].
///
/// Defaults to `true` as this is the expected behavior for games.
///
/// # Platform-specific
///
/// - Only used on macOS.
///
/// [`WindowAttributesExtMacOS::with_borderless_game`]: https://docs.rs/winit/latest/x86_64-apple-darwin/winit/platform/macos/trait.WindowAttributesExtMacOS.html#tymethod.with_borderless_game
pub borderless_game: bool,
/// Sets whether the Window prefers the home indicator hidden.
///
/// Corresponds to [`WindowAttributesExtIOS::with_prefers_home_indicator_hidden`].
Expand Down Expand Up @@ -504,6 +516,7 @@ impl Default for Window {
titlebar_transparent: false,
titlebar_show_title: true,
titlebar_show_buttons: true,
borderless_game: true,
prefers_home_indicator_hidden: false,
prefers_status_bar_hidden: false,
preferred_screen_edges_deferring_system_gestures: Default::default(),
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ impl WinitWindows {
.with_titlebar_hidden(!window.titlebar_shown)
.with_titlebar_transparent(window.titlebar_transparent)
.with_title_hidden(!window.titlebar_show_title)
.with_titlebar_buttons_hidden(!window.titlebar_show_buttons);
.with_titlebar_buttons_hidden(!window.titlebar_show_buttons)
.with_borderless_game(window.borderless_game);
}

#[cfg(target_os = "ios")]
Expand Down