Skip to content

Commit

Permalink
Merge pull request #84649 from bruvzg/mac_fs_fs_switch
Browse files Browse the repository at this point in the history
[macOS] Fix fullscreen <-> exclusive fullscreen transition.
  • Loading branch information
akien-mga committed Nov 9, 2023
2 parents b06fe0d + 4fda7e1 commit 03d9797
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions platform/macos/display_server_macos.mm
Original file line number Diff line number Diff line change
Expand Up @@ -3282,6 +3282,18 @@ - (void)popupAction:(id)sender {
} 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.
Expand Down Expand Up @@ -3335,6 +3347,7 @@ - (void)popupAction:(id)sender {
wd.exclusive_fullscreen = true;
} else {
wd.exclusive_fullscreen = false;
update_presentation_mode();
}
} break;
case WINDOW_MODE_MAXIMIZED: {
Expand Down

0 comments on commit 03d9797

Please sign in to comment.