Set touch input as handled only after _gui_call_input

This commit is contained in:
necrashter 2022-12-26 11:58:32 +03:00
parent 0f10eafb38
commit 147de75e52
No known key found for this signature in database
GPG Key ID: 5AF6D537E8E3D77E
1 changed files with 2 additions and 2 deletions

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;
}