-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Fix double tap & drag on Android #76791
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,7 +197,10 @@ internal class GodotGestureHandler : SimpleOnGestureListener(), OnScaleGestureLi | |
if (event.actionMasked == MotionEvent.ACTION_UP) { | ||
nextDownIsDoubleTap = false | ||
GodotInputHandler.handleMotionEvent(event) | ||
} else if (event.actionMasked == MotionEvent.ACTION_MOVE && panningAndScalingEnabled == false) { | ||
GodotInputHandler.handleMotionEvent(event) | ||
} | ||
|
||
return true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure why this was always returning true even for cases when it wasn't actually handling the event. I've changed it to only return true when it handles the event, consistent with the other event listeners here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't look correct, this callback should receive both down and up events and with this update the logic now returns false for down events, which would have the effect of cancelling the next up event. |
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, is this correct, that a ACTION_UP should trigger a motion event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's correct, this correspond to the release of the double tap event.