Skip to content

Commit

Permalink
Exposing winit decorations (#627)
Browse files Browse the repository at this point in the history
Exposing winit decorations
  • Loading branch information
Cupnfish authored Oct 5, 2020
1 parent 219527e commit 125afb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions crates/bevy_window/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub struct Window {
pub title: String,
pub vsync: bool,
pub resizable: bool,
pub decorations: bool,
pub mode: WindowMode,
#[cfg(target_arch = "wasm32")]
pub canvas: Option<String>,
Expand All @@ -65,6 +66,7 @@ impl Window {
title: window_descriptor.title.clone(),
vsync: window_descriptor.vsync,
resizable: window_descriptor.resizable,
decorations: window_descriptor.decorations,
mode: window_descriptor.mode,
#[cfg(target_arch = "wasm32")]
canvas: window_descriptor.canvas.clone(),
Expand All @@ -80,6 +82,7 @@ pub struct WindowDescriptor {
pub title: String,
pub vsync: bool,
pub resizable: bool,
pub decorations: bool,
pub mode: WindowMode,
#[cfg(target_arch = "wasm32")]
pub canvas: Option<String>,
Expand All @@ -98,6 +101,7 @@ impl Default for WindowDescriptor {
height: 720,
vsync: true,
resizable: true,
decorations: true,
mode: WindowMode::Windowed,
#[cfg(target_arch = "wasm32")]
canvas: None,
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 @@ -35,7 +35,8 @@ impl WinitWindows {
)),
_ => winit_window_builder
.with_inner_size(winit::dpi::PhysicalSize::new(window.width, window.height))
.with_resizable(window.resizable),
.with_resizable(window.resizable)
.with_decorations(window.decorations),
};

#[allow(unused_mut)]
Expand Down

0 comments on commit 125afb4

Please sign in to comment.