Skip to content

Enable borderless_game for winit on macos#22853

Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom
TarekAS:fix/macos-borderless-fullscreen-menu-bar
Feb 9, 2026
Merged

Enable borderless_game for winit on macos#22853
alice-i-cecile merged 1 commit intobevyengine:mainfrom
TarekAS:fix/macos-borderless-fullscreen-menu-bar

Conversation

@TarekAS
Copy link
Contributor

@TarekAS TarekAS commented Feb 7, 2026

Problem

Borderless Fullscreen on macOS does not hide the menu bar.

Fixes: #14783

Solution

winit 0.30 added a window attribute that hides the dock and menu bar when using on macOS. This exposes that option as a field on Bevy's component, defaulting to true since this is the expected behavior in games.

Testing

Tested by setting

DefaultPlugins.set(WindowPlugin {
    primary_window: Some(Window {
        mode: WindowMode::BorderlessFullscreen(MonitorSelection::Primary),
...

Launch the bevy app, and you should see that the menu bar is hidden.

Showcase

Before:
image

After:
image

Known Issues

rust-windowing/winit#4477 - when switching spaces (e.g. using mission control), the menu bar regains visibility -- fixed by rust-windowing/winit#4482

   dock/menu bar on macOS

   Fixes bevyengine#14783

   Winit 0.30 added a  window attribute that hides the
   dock and menu bar when using  on macOS. This
   exposes that option as a  field on Bevy's
   component, defaulting to  since this is the expected behavior
   for games.
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

@IQuick143 IQuick143 added A-Windowing Platform-agnostic interface layer to run your app in O-MacOS Specific to the MacOS (Apple) desktop operating system D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 7, 2026
@Smerom
Copy link
Contributor

Smerom commented Feb 7, 2026

From the screenshots it looks like the menu bar is still taking up space, just with the icons hidden. Is that the case?

@TarekAS
Copy link
Contributor Author

TarekAS commented Feb 7, 2026

That is the menu bar and notch area. To my knowledge all games have that blacked out as they don't want to stretch over that area (which would make the notch visible and also change the aspect ratio from 16:10 to something like 15.4:10)

Copy link
Contributor

@kfc35 kfc35 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on Sequoia and it works as expected.

Before: after initializing into borderless full screen mode, the menu bar becomes visible if you move the cursor over it
After: after initializing into borderless full screen mode, the menu bar stays invisible even if you move the cursor over it

@kfc35 kfc35 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 8, 2026
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Feb 9, 2026
Merged via the queue into bevyengine:main with commit dea15b6 Feb 9, 2026
49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Windowing Platform-agnostic interface layer to run your app in D-Straightforward Simple bug fixes and API improvements, docs, test and examples O-MacOS Specific to the MacOS (Apple) desktop operating system S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BorderlessFullscreen does not cover the menu bar on macOS

5 participants