Fix exclusive child focus grab, when there are more than two child windows.

This commit is contained in:
bruvzg 2020-07-09 11:18:56 +03:00
parent 18c51d3f0c
commit 9ffc1c19ad
No known key found for this signature in database
GPG Key ID: FCED35F1CECE0D3A
1 changed files with 6 additions and 1 deletions

View File

@ -893,7 +893,12 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) {
}
if (exclusive_child != nullptr) {
exclusive_child->grab_focus();
Window *focus_target = exclusive_child;
while (focus_target->exclusive_child != nullptr) {
focus_target->grab_focus();
focus_target = focus_target->exclusive_child;
}
focus_target->grab_focus();
if (!is_embedding_subwindows()) { //not embedding, no need for event
return;