-
Notifications
You must be signed in to change notification settings - Fork 6k
Remove single view assumption from pointer events #41602
Remove single view assumption from pointer events #41602
Conversation
gspencergoog
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.
| const PointerDataPacket& packet) { | ||
| if (auto* platform_configuration = GetPlatformConfigurationIfAvailable()) { | ||
| TRACE_EVENT0("flutter", "RuntimeController::DispatchPointerDataPacket"); | ||
| platform_configuration->get_window(0)->DispatchPointerDataPacket(packet); |
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.
On the framework side, how does it know which window to associate the pointer data with? Or does it just not do that, and pointer data is just in global screen coordinates?
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.
We'll be adding a viewId member to PointerData that will be set by embedders. However, that requires changing the embedder API which we'll do only after we've reviewed the multi-view engine spec.
dkwingsmt
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
|
It seems like the plan is to move all messaging methods out of |
Yup, the only other method - set viewport metrics - will also get lifted up to |
cbracken
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.
This looks great -- I've got nothing! Nice!
…125734) flutter/engine@8f04b29...0079bb4 2023-04-29 [email protected] Remove single view assumption from pointer events (flutter/engine#41602) 2023-04-29 [email protected] Roll Fuchsia Mac SDK from kNDuhglIFq_xEt5n3... to XeUTCh70VOPbIFXdz... (flutter/engine#41608) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from kNDuhglIFq_x to XeUTCh70VOPb If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

This change removes the assumption that that all pointer events go to the view ID
0. This change also adds a test for pointer events.Part of: flutter/flutter#112205
Background
All pointer events are sent to
PlatformDispatcher.onPointerDataPacket. In the future, aviewIdproperty will be addedPointerData, which the framework (specifically,GestureBinding) will use to route the event to the proper view. ThisviewIdproperty's value will be set by the embedders.Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.