Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Fix fullscreen <-> exclusive fullscreen transition. #84649

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading