Skip to content
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

Expose pointer type and buttons in embedder.h #9034

Merged
merged 2 commits into from May 22, 2019

Conversation

stuartmorgan
Copy link
Contributor

Rather than hard-coding the type of incoming events to mouse, and
synthesizing a primary button press for kDown/kUp, expose device kind
and buttons in the API.

For backwards compatibility, if the type is not set, the old behavior is
used. If an embedder sets the type to mouse explicitly, however, they
must also set correct button information.

For the touch type, the API abstracts away the framework's internal
expectation that a button is set for touch down/move for simplicity.

Fixes flutter/flutter#32854

Rather than hard-coding the type of incoming events to mouse, and
synthesizing a primary button press for kDown/kUp, expose device kind
and buttons in the API.

For backwards compatibility, if the type is not set, the old behavior is
used. If an embedder sets the type to mouse explicitly, however, they
must also set correct button information.

For the touch type, the API abstracts away the framework's internal
expectation that a button is set for touch down/move for simplicity.
@stuartmorgan
Copy link
Contributor Author

I only exposed mouse and touch for now to keep the patch focused; we can trivially add stylus later.

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM except for trivial issues

shell/platform/embedder/embedder.h Outdated Show resolved Hide resolved
shell/platform/embedder/embedder.h Show resolved Hide resolved
@stuartmorgan stuartmorgan merged commit 4dbb9ba into flutter:master May 22, 2019
@stuartmorgan stuartmorgan deleted the embedding-api-buttons branch May 22, 2019 15:30
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 22, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request May 22, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request May 22, 2019
flutter/engine@64f18f2...8dc3a4c

git log 64f18f2..8dc3a4c --no-merges --oneline
8dc3a4c Add missing top level to stub_ui (flutter/engine#9060)
6299af3 remove over-optimistic assert (flutter/engine#9045)
0308a1c Roll src/third_party/dart fde6a5917e..e3edfd36b2 (14 commits)
1bce779 Roll src/third_party/skia e63b01b364a0..f77dbd04b926 (19 commits) (flutter/engine#9057)
4dbb9ba Expose pointer type and buttons in embedder.h (flutter/engine#9034)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (garyq@google.com), and stop
the roller if necessary.
huqiuser pushed a commit to huqiuser/engine that referenced this pull request Jun 12, 2019
Rather than hard-coding the type of incoming events to mouse, and
synthesizing a primary button press for kDown/kUp, expose device kind
and buttons in the API.

For backwards compatibility, if the type is not set, the old behavior is
used. If an embedder sets the type to mouse explicitly, however, they
must also set correct button information.

For the touch type, the API abstracts away the framework's internal
expectation that a button is set for touch down/move for simplicity.

Fixes flutter/flutter#32854
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants