diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index 4b545966d2a..d76e41f61cb 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -3282,6 +3282,18 @@ void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) { } break; case WINDOW_MODE_EXCLUSIVE_FULLSCREEN: case WINDOW_MODE_FULLSCREEN: { + if (p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN || p_mode == WINDOW_MODE_FULLSCREEN) { + if (p_mode == WINDOW_MODE_EXCLUSIVE_FULLSCREEN) { + const NSUInteger presentationOptions = NSApplicationPresentationHideDock | NSApplicationPresentationHideMenuBar; + [NSApp setPresentationOptions:presentationOptions]; + wd.exclusive_fullscreen = true; + } else { + wd.exclusive_fullscreen = false; + update_presentation_mode(); + } + return; + } + [(NSWindow *)wd.window_object setLevel:NSNormalWindowLevel]; _set_window_per_pixel_transparency_enabled(true, p_window); if (wd.resize_disabled) { // Restore resize disabled. @@ -3335,6 +3347,7 @@ void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) { wd.exclusive_fullscreen = true; } else { wd.exclusive_fullscreen = false; + update_presentation_mode(); } } break; case WINDOW_MODE_MAXIMIZED: {