Skip to content

Commit

Permalink
Merge pull request #77730 from Jummit/fix-subviewport-1
Browse files Browse the repository at this point in the history
Fix `push_input` events not going through after first pressed mouse event
  • Loading branch information
YuriSizov committed Jan 22, 2024
2 parents 0bcc0e9 + 7957354 commit e0f8cf4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scene/main/viewport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e0f8cf4

Please sign in to comment.