Skip to content

Commit

Permalink
fix: Use BorderlessFullscreen instead of true fullscreen (fix alt+tab) (
Browse files Browse the repository at this point in the history
#391)

Using borderless fullscreen mode fixes alt tab not working in
fullscreen. Probably should support both - but this seems like a
preferable default.

One side effect I see in jumpy is that when fullscreen on high res
display the UI scaling no longer gets tiny (now looks as I'd expect).
I'd show screenshots to compare, but the screenshot tool on macOS
doesn't work in true fullscreen mode either 😉

Any concerns with this?
  • Loading branch information
MaxCWhitehead authored Apr 23, 2024
1 parent b7db196 commit e94841d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions framework_crates/bones_bevy_renderer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -790,17 +790,17 @@ fn step_bones_game(world: &mut World) {
None => {
data.game.insert_shared_resource(bones::Window {
size: vec2(window.width(), window.height()),
fullscreen: matches!(&window.mode, WindowMode::Fullscreen),
fullscreen: matches!(&window.mode, WindowMode::BorderlessFullscreen),
});
data.game.shared_resource_cell().unwrap()
}
};
let bones_window = bones_window.borrow_mut().unwrap();

let is_fullscreen = matches!(&window.mode, WindowMode::Fullscreen);
let is_fullscreen = matches!(&window.mode, WindowMode::BorderlessFullscreen);
if is_fullscreen != bones_window.fullscreen {
window.mode = if bones_window.fullscreen {
WindowMode::Fullscreen
WindowMode::BorderlessFullscreen
} else {
WindowMode::Windowed
};
Expand Down

0 comments on commit e94841d

Please sign in to comment.