Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@loic-sharma
Copy link
Member

@loic-sharma loic-sharma commented Feb 20, 2024

The Windows embedder registers "message procedures" to handle to top-level window events. These message procedures should be called in the order that they are registered.

For example, a plugin can override the embedder's app lifecycle behavior by registering a message procedure before the embedder's app lifecycle message procedure.

This did not always work as expected as the message procedures were ordered by their pointers instead of their insertion order.

Fixes flutter/flutter#137963

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.


private:
std::map<FlutterDesktopWindowProcCallback, void*>
top_level_window_proc_handlers_;
Copy link
Member Author

Choose a reason for hiding this comment

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

This std::map is what ordered the callbacks by their pointers.

@loic-sharma loic-sharma changed the title [Windows] Order top-level message procedures [Windows] Fix top-level message procedure order Feb 20, 2024
Copy link
Contributor

@yaakovschectman yaakovschectman left a comment

Choose a reason for hiding this comment

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

LGTM

@loic-sharma loic-sharma force-pushed the windows_msg_proc_order branch from e57ed7c to a2558d4 Compare February 21, 2024 19:09
@loic-sharma loic-sharma added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 21, 2024
@auto-submit auto-submit bot merged commit fa50a0a into flutter:main Feb 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 21, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Feb 22, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Feb 22, 2024
…143911)

flutter/engine@bf5c003...7eeb697

2024-02-22 [email protected] Add view focus direction detection to flutter web. (flutter/engine#50843)
2024-02-22 [email protected] Add a similar `runIf` guard to `web_engine` as web framework. (flutter/engine#50846)
2024-02-22 [email protected] Add scheduleWarmUpFrame (flutter/engine#50570)
2024-02-22 [email protected] Remove/reduce unused or private methods and add tests to `SkiaGoldClient` (flutter/engine#50844)
2024-02-22 [email protected] Clean up contributing formatting, add a Skia gold callout (flutter/engine#50828)
2024-02-21 [email protected] Make Android Studio be able to run android embedding unit tests out of the box (flutter/engine#50840)
2024-02-21 [email protected] Shift some deps to //flutter/third_party (flutter/engine#50830)
2024-02-21 [email protected] Make the view focus binding report focus transitions across elements. (flutter/engine#50610)
2024-02-21 [email protected] [macOS] Wrap FlutterEngineTest in autoreleasepool (flutter/engine#50832)
2024-02-21 [email protected] Update the vulkan_glfw sample for the latest roll of vulkan-deps (flutter/engine#50839)
2024-02-21 [email protected] Roll Skia from 8fa858855820 to 57490c8d257e (6 revisions) (flutter/engine#50833)
2024-02-21 [email protected] Starts a .ci.yaml parser (flutter/engine#50783)
2024-02-21 [email protected] Roll Dart SDK from f344e2266468 to 0f0f7400c38a (6 revisions) (flutter/engine#50837)
2024-02-21 [email protected] [Windows] Fix top-level message procedure order (flutter/engine#50797)
2024-02-21 [email protected] Tweak verbose log messages in ImageReaderSurfaceProducer (flutter/engine#50831)
2024-02-21 [email protected] Add a throw statement for imgtestAdd non 0 exit codes. (flutter/engine#50829)

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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
@loic-sharma loic-sharma deleted the windows_msg_proc_order branch February 22, 2024 18:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

affects: desktop autosubmit Merge PR when tree becomes green via auto submit App platform-fuchsia platform-windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Windows] Fix the FlutterWindowsEngineTest.TestExitSecondCloseMessage test

2 participants