Merge pull request #90131 from rodrigodias4/fix86495
Fix macOS menu bar & dock stop appearing after closing sub-window
This commit is contained in:
commit
61b56f6019
|
@ -2084,13 +2084,22 @@ Size2i DisplayServerMacOS::window_get_max_size(WindowID p_window) const {
|
|||
}
|
||||
|
||||
void DisplayServerMacOS::update_presentation_mode() {
|
||||
bool has_fs_windows = false;
|
||||
for (const KeyValue<WindowID, WindowData> &wd : windows) {
|
||||
if (wd.value.fullscreen && wd.value.exclusive_fullscreen) {
|
||||
if (wd.value.fullscreen) {
|
||||
if (wd.value.exclusive_fullscreen) {
|
||||
return;
|
||||
} else {
|
||||
has_fs_windows = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (has_fs_windows) {
|
||||
[NSApp setPresentationOptions:NSApplicationPresentationAutoHideMenuBar | NSApplicationPresentationAutoHideDock | NSApplicationPresentationFullScreen];
|
||||
} else {
|
||||
[NSApp setPresentationOptions:NSApplicationPresentationDefault];
|
||||
}
|
||||
}
|
||||
|
||||
void DisplayServerMacOS::window_set_min_size(const Size2i p_size, WindowID p_window) {
|
||||
_THREAD_SAFE_METHOD_
|
||||
|
|
Loading…
Reference in New Issue