summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-19 10:03:17 +0100
committerGitHub <noreply@github.com>2022-01-19 10:03:17 +0100
commit74b110a736c35d7183898b01b2f03db3bb98a5a5 (patch)
tree9eceebd6d0119b867a71076eb0a0a5407ad58e8b /scene/main
parent827c8e22b76307687fc34ad8826e438ed53b21ae (diff)
parentd62ca0c9c02fa202ca294e75c2bb12dfe774cc75 (diff)
Merge pull request #56825 from bruvzg/macos_fix_fullscr_multiwindow
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/window.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 43de4187d4..1ca4f0018b 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -281,6 +281,11 @@ void Window::_clear_window() {
DisplayServer::get_singleton()->delete_sub_window(window_id);
window_id = DisplayServer::INVALID_WINDOW_ID;
+ // If closing window was focused and has a parent, return focus.
+ if (focused && transient_parent) {
+ transient_parent->grab_focus();
+ }
+
_update_viewport_size();
RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_DISABLED);
}