-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[3.x] Fix routing of InputEventScreenDrag
events to Control
nodes
#68630
[3.x] Fix routing of InputEventScreenDrag
events to Control
nodes
#68630
Conversation
InputEventScreenDrag
events to Control
nodesInputEventScreenDrag
events to Control
nodes
cc @Sauermann |
Alternative to #34383 |
792833a
to
b28bcb4
Compare
@RandomShaper Ping on this PR. It's the same as #68632 for the |
Thanks! |
Cherry-picked for 3.5.2 |
Reverted with a204af9 to fix regression #70119. We can consider cherry-picking it again if/when the regression is fixed in Edit: #70583 fixes the regression, so it could be cherry-picked. But let's first wait for test reports on 3.6 beta 1 before bringing this change to 3.5. |
I have noticed that if you have overlapping TextureButtons it is impossible to guarantee that the topmost button is the one that gets clicked. It depends on order in the tree but if you reorder them it still can affect the button below. This is maybe not a common problem, but in my case, making a jigsaw game it is a critical issue. Maybe this problem is related to this one? Just a heads up if you are looking around in this code. |
Multitouch support enables multiple concurrent
InputEventScreenTouch
andInputEventScreenDrag
events each differentiated by theirindex
property.An
InputEventScreenDrag
event typically follows anotherInputEventScreenDrag
orInputEventScreenTouch
event and thus should be routed to the target that last matched the previous touch event.Prior to this fix, in a multitouch scenario only the target of the first touch event was tracked, causing all subsequent multitouch drag events to be routed to that invalid target. The PR tracks the touch targets using the touch event's
index
property, and use that data to properly route drag events based on their matchingindex
property.main version