Merge pull request #84649 from bruvzg/mac_fs_fs_switch
[macOS] Fix fullscreen <-> exclusive fullscreen transition.
This commit is contained in:
commit
03d97977b1
1 changed files with 13 additions and 0 deletions
|
@ -3282,6 +3282,18 @@ void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) {
|
||||||
} break;
|
} break;
|
||||||
case WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
|
case WINDOW_MODE_EXCLUSIVE_FULLSCREEN:
|
||||||
case WINDOW_MODE_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];
|
[(NSWindow *)wd.window_object setLevel:NSNormalWindowLevel];
|
||||||
_set_window_per_pixel_transparency_enabled(true, p_window);
|
_set_window_per_pixel_transparency_enabled(true, p_window);
|
||||||
if (wd.resize_disabled) { // Restore resize disabled.
|
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;
|
wd.exclusive_fullscreen = true;
|
||||||
} else {
|
} else {
|
||||||
wd.exclusive_fullscreen = false;
|
wd.exclusive_fullscreen = false;
|
||||||
|
update_presentation_mode();
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case WINDOW_MODE_MAXIMIZED: {
|
case WINDOW_MODE_MAXIMIZED: {
|
||||||
|
|
Loading…
Reference in a new issue