How to mark input event as unhandled

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By SomeGuy

I have a TextureRect Control Node which is listening for mouse input via a gui input signal (I found this to be a really nice way to get the mouse position relative to the node via the event.position property) and on top (i.e. lower sibling in the scene tree) of it I have an Area2D node with Collision shape as child listening for the mouse input via input event signal. It is really important that collision shape is circular, that’s why I went with Area2D/CircularCollisionShape route.

Now, when there is mouse click on the circular shape I need both of these nodes to fire their input functions. However, since TextureRect is a Control node, it catches the event first, fires its associated function and marks it as handled and it never gets to the input_event of the area2D. I understand this is the expected behaviour.

How do I mark the event that is being handled by Control Node as “unhandled” so that it keeps propagating to other non-control nodes ( _unhandled_input functions, collision_shapes, etc.)? The way I’m doing it now works, but its not very elegant.

At the end of Control gui_input function I go:
var oldMouseFilter = $TextureRect.mouse_filter $TextureRect.mouse_filter = 2 get_tree().input_event(event) $TextureRect.mouse_filter = oldMouseFilter

Thanks for your advice!