Fix InputEvent handling order in ViewportContainer
Created by: logicor-cn
See #25525
UI components inside a contained Viewport
are expected to follow
the same global InputEvent handling order, which means _input
function in any Node
shall be honored first, then _gui_input
function of those under the cursor / focus.
However, currently implementation of ViewportContainer
uses its
_input
to capture events for both _input
and _gui_input
of
UI Control
under contained Viewport
. Effectively giving their
_gui_input
the priority of _input
. This could:
- Errornously triggle
_gui_input
UIControl
inside containedViewport
- Errornously block
_gui_input
UIControl
from receiving due event. (Due to event being consumed by 1)
Separate the event delivery between ViewportContainer
and Viewport
into _input
and _gui_input
so proper InputEvent handling order
is restored.