bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.26k stars 3.58k forks source link

BorderlessFullscreen does not cover the menu bar on macOS #14783

Open TarekAS opened 3 months ago

TarekAS commented 3 months ago

Bevy version

0.14.1

Relevant system information

cargo 1.80.1 (376290515 2024-07-16) macOS Sonoma 14.5

Automatically hide and show menu bar is set to Never in the system preferences.

What you did

Basic bevy app with BorderlessFullscreen enabled, running on macOS.

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
                mode: bevy::window::WindowMode::BorderlessFullscreen,
                resolution: bevy::window::WindowResolution::default(),
                ..default()
            }),
            ..default()
        }))
        .run();
}

What went wrong

Expectations: BorderlessFullscreen should cover the entire screen.

What actually happened: it didn't cover the menu bar

Additional information

image

Hovering near the menu bar also exposes the title bar image

If this is not considered a bug, perhaps there should be an option to cover the entire menu bar as well.

alice-i-cecile commented 3 months ago

Can you reproduce this in winit itself? I suspect this is a bug upstream: once reproduced there please open an issue on their repo and link it here (or vice versa).

TarekAS commented 3 months ago

I investigated a bit and here's what I found:

It turns out I had set Automatically hide and show the menu bar to Never in my settings. However, in a bevy game, this should ignored and the menu bar should be hidden either way.