Merge pull request #70583 from necrashter/fix-set-touch-input-as-handled

[3.x] Set touch input as handled only after _gui_call_input
This commit is contained in:
Rémi Verschelde 2023-01-09 09:17:22 +01:00
commit 50fd962869
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2329,8 +2329,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
}
touch_event->set_position(pos);
_gui_call_input(over, touch_event);
set_input_as_handled();
}
set_input_as_handled();
return;
}
} else {
@ -2346,8 +2346,8 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) {
touch_event->set_position(pos);
_gui_call_input(over, touch_event);
set_input_as_handled();
}
set_input_as_handled();
gui.touch_focus.erase(touch_index);
return;
}