-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Redo#2: Add buttons to gestures #31935
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
Conversation
|
+cc @stuartmorgan @jonahwilliams |
|
I would suggest doing a separate PR that adds button data to the pointer data created in embedder.cc, landing that, and then re-landing your CL. Sending the button data shouldn't depend on your PR, so that lets you do a simple, easy-to-review PR for that aspect, rather than it being part of an already-large PR. |
|
@jonahwilliams I've tested this PR on desktop and confirmed that the button responds to LMB click, and no longer to RMB click. The environment is as follow:
|
jonahwilliams
left a comment
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.
LGTM
|
@dkwingsmt , I created a ticket with some detail at #36118 , but I traced the broken scroll on the chromebook touchpad back to this PR. |
| properties.add(FlagProperty('wonArenaForPrimaryPointer', value: _wonArenaForPrimaryPointer, ifTrue: 'won arena')); | ||
| properties.add(DiagnosticsProperty<Offset>('finalPosition', _finalPosition, defaultValue: null)); | ||
| properties.add(FlagProperty('sentTapDown', value: _sentTapDown, ifTrue: 'sent tap down')); | ||
| // TODO(tongmu): Add property _initialButtons and update related tests |
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.
is there any reason we couldn't do this as part of this PR when it landed?
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.
It was because that this PR was already big and at its 2nd redo, so I didn’t want to introduce unnecessary changes that affected a lot of files at that time. I’ll fix this.
#61671) After #31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.
flutter#61671) After flutter#31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.
flutter#61671) After flutter#31935, Some one sequence gesture recognizers requires at least one callback to be able to compete in the arena. This PR adds the a no-op callback in the gesture recognizer in the platform view when the gesture recognizer does not have any callbacks. This way, all the gesture recognizers in the platform view can compete in the arena.
Description
This PR is a reland of #31819.
Changes:
Explanation
The previous attempt #31819 broke desktop embedders (see more discussion at #31884). It's likely because the embedder API does not send buttons at all, which is a requirement by gesture recognizers after this PR.
Related Issues
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?