Skip to content

Commit

Permalink
Apply WindowDescriptor settings in all modes (#6934)
Browse files Browse the repository at this point in the history
# Objective
Some settings were only applied in windowed mode.
Fix the issue in #6933 

# Solution
Always apply the settings.


Co-authored-by: devil-ira <justthecooldude@gmail.com>
  • Loading branch information
tim-blackbird and tim-blackbird committed Dec 16, 2022
1 parent 0d60603 commit 00fa0d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/bevy_winit/src/winit_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,20 @@ impl WinitWindows {
window_descriptor.height as u32,
)),
)),
_ => {
WindowMode::Windowed => {
if let Some(sf) = scale_factor_override {
winit_window_builder.with_inner_size(logical_size.to_physical::<f64>(sf))
} else {
winit_window_builder.with_inner_size(logical_size)
}
}
};

winit_window_builder = winit_window_builder
.with_resizable(window_descriptor.resizable)
.with_decorations(window_descriptor.decorations)
.with_transparent(window_descriptor.transparent)
.with_always_on_top(window_descriptor.always_on_top),
};
.with_always_on_top(window_descriptor.always_on_top);

let constraints = window_descriptor.resize_constraints.check_constraints();
let min_inner_size = LogicalSize {
Expand Down

0 comments on commit 00fa0d8

Please sign in to comment.