X Tutup
Skip to content

Fix description of Viewport::set_input_as_handled#111591

Merged
Repiteo merged 1 commit intogodotengine:masterfrom
br0b:master
Oct 14, 2025
Merged

Fix description of Viewport::set_input_as_handled#111591
Repiteo merged 1 commit intogodotengine:masterfrom
br0b:master

Conversation

@br0b
Copy link
Contributor

@br0b br0b commented Oct 13, 2025

The input is propagated bottom-up in the scene tree hierarchy. It's not obvious that it's the case, so let's prove that the nodes are indeed traversed post-order.

In method SceneTree::_call_input_pause the nodes to be traversed are ordered using SceneTree::_update_group_order, which orders the nodes from first to last in tree hierarchy. Then this ordered Vector is traversed in the reverese order.

Indeed, the old description was incorrect and it has been fixed. The set_input_as_handled method stops the InputEvent from propagating up, not down.

Fixes #111571.

@br0b br0b requested a review from a team as a code owner October 13, 2025 13:07
@AThousandShips AThousandShips added this to the 4.6 milestone Oct 13, 2025
Copy link
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed this is correct. Node's _input & co's descriptions state this correctly, too. It's the small things that count to reduce confusion.

@Repiteo
Copy link
Contributor

Repiteo commented Oct 14, 2025

Could you trim the commit message to just the heading? It doesn't need to repeat the PR's description, and linking the issue itself would cause unwanted pings whenever the commit is referenced

The method stops the `InputEvent` from propagating up, not down.
@br0b
Copy link
Contributor Author

br0b commented Oct 14, 2025

Done.

@Repiteo Repiteo merged commit b7bbdfd into godotengine:master Oct 14, 2025
20 checks passed
@Repiteo
Copy link
Contributor

Repiteo commented Oct 14, 2025

Thanks! Congratulations on your first merged contribution! 🎉

@br0b
Copy link
Contributor Author

br0b commented Oct 14, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Doc]Wrong description in set_input_as_handled method

4 participants

X Tutup