Skip to content

Commit 61b56f6

Browse files
committed
Merge pull request godotengine#90131 from rodrigodias4/fix86495
Fix macOS menu bar & dock stop appearing after closing sub-window
2 parents ffa650f + a4f2e52 commit 61b56f6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

platform/macos/display_server_macos.mm

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2084,12 +2084,21 @@
20842084
}
20852085

20862086
void DisplayServerMacOS::update_presentation_mode() {
2087+
bool has_fs_windows = false;
20872088
for (const KeyValue<WindowID, WindowData> &wd : windows) {
2088-
if (wd.value.fullscreen && wd.value.exclusive_fullscreen) {
2089-
return;
2089+
if (wd.value.fullscreen) {
2090+
if (wd.value.exclusive_fullscreen) {
2091+
return;
2092+
} else {
2093+
has_fs_windows = true;
2094+
}
20902095
}
20912096
}
2092-
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
2097+
if (has_fs_windows) {
2098+
[NSApp setPresentationOptions:NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock | NSApplicationPresentationFullScreen];
2099+
} else {
2100+
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
2101+
}
20932102
}
20942103

20952104
void DisplayServerMacOS::window_set_min_size(const Size2i p_size, WindowID p_window) {

0 commit comments

Comments
 (0)