diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-03 17:22:29 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-10-03 17:22:29 +0200 |
commit | 124f8983b878bd31e46c7651c58750a5d3b1d436 (patch) | |
tree | 1832ca84b5845147341261d348f6ef6b03961a93 /platform/macos/display_server_macos.mm | |
parent | 0358abbeba015ee8009186887f9269bec08b659c (diff) | |
parent | 873d4079d16765abe6d07073daa779bd04eadb99 (diff) | |
download | redot-engine-124f8983b878bd31e46c7651c58750a5d3b1d436.tar.gz |
Merge pull request #82357 from bruvzg/mac_fix_bl
[macOS] Fix borderless mode on macOS 13.6+.
Diffstat (limited to 'platform/macos/display_server_macos.mm')
-rw-r--r-- | platform/macos/display_server_macos.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index 1fd1a46dba..f984fd9dc5 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -3225,7 +3225,9 @@ void DisplayServerMacOS::window_set_flag(WindowFlags p_flag, bool p_enabled, Win } break; case WINDOW_FLAG_BORDERLESS: { // OrderOut prevents a lose focus bug with the window. + bool was_visible = false; if ([wd.window_object isVisible]) { + was_visible = true; [wd.window_object orderOut:nil]; } wd.borderless = p_enabled; @@ -3240,7 +3242,7 @@ void DisplayServerMacOS::window_set_flag(WindowFlags p_flag, bool p_enabled, Win [wd.window_object setFrame:frameRect display:NO]; } _update_window_style(wd); - if ([wd.window_object isVisible]) { + if (was_visible || [wd.window_object isVisible]) { if ([wd.window_object isMiniaturized]) { return; } else if (wd.no_focus) { |