diff options
Diffstat (limited to 'scene/main/window.cpp')
-rw-r--r-- | scene/main/window.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/main/window.cpp b/scene/main/window.cpp index a5c5be8a44..9f014e8175 100644 --- a/scene/main/window.cpp +++ b/scene/main/window.cpp @@ -246,6 +246,8 @@ void Window::_make_window() { } } + _update_window_callbacks(); + RS::get_singleton()->viewport_set_update_mode(get_viewport_rid(), RS::VIEWPORT_UPDATE_WHEN_VISIBLE); DisplayServer::get_singleton()->show_window(window_id); } @@ -379,7 +381,6 @@ void Window::set_visible(bool p_visible) { } if (p_visible && window_id == DisplayServer::INVALID_WINDOW_ID) { _make_window(); - _update_window_callbacks(); } } else { if (visible) { @@ -738,7 +739,6 @@ void Window::_notification(int p_what) { //create if (visible) { _make_window(); - _update_window_callbacks(); } } } @@ -895,11 +895,11 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) { if (exclusive_child != nullptr) { Window *focus_target = exclusive_child; + focus_target->grab_focus(); while (focus_target->exclusive_child != nullptr) { - focus_target->grab_focus(); focus_target = focus_target->exclusive_child; + focus_target->grab_focus(); } - focus_target->grab_focus(); if (!is_embedding_subwindows()) { //not embedding, no need for event return; |