Merge pull request #77730 from Jummit/fix-subviewport-1

Fix `push_input` events not going through after first pressed mouse event
This commit is contained in:
Yuri Sizov 2024-01-22 20:38:22 +01:00
commit e0f8cf4acb
1 changed files with 10 additions and 0 deletions

View File

@ -3316,6 +3316,16 @@ void Viewport::push_input(const Ref<InputEvent> &p_event, bool p_local_coords) {
}
local_input_handled = false;
if (!handle_input_locally) {
Viewport *vp = this;
while (true) {
if (Object::cast_to<Window>(vp) || !vp->get_parent()) {
break;
}
vp = vp->get_parent()->get_viewport();
}
vp->local_input_handled = false;
}
Ref<InputEvent> ev;
if (!p_local_coords) {