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

[Windows] Delay enabling app lifecycle states until requested #44238

Merged
merged 4 commits into from
Aug 17, 2023

Conversation

yaakovschectman
Copy link
Contributor

Await a platform message before sending lifecycle state updates so we are not sending messages that do not get consumed by the framework.
In the near future we hope to extend the embedder API to allow registering callbacks called upon the framework registering a listener to a channel, which would obviate this problem.

flutter/flutter#131616

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

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 Hixie said 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.

Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

LGTM, nice work!

@yaakovschectman yaakovschectman merged commit 233a2e0 into flutter:main Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 17, 2023
…132797)

flutter/engine@5336702...5019d6d

2023-08-17 dkwingsmt@users.noreply.github.com Basic view management for engine classes (flutter/engine#42991)
2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from d0d390f9310d to bfd45173e5e3 (5 revisions) (flutter/engine#44820)
2023-08-17 matanlurey@users.noreply.github.com Implement 2 suggested Clang Tidy fixes we don't look for yet. (flutter/engine#44816)
2023-08-17 louiseh0313@gmail.com Add share to selection controls (flutter/engine#44554)
2023-08-17 zanderso@users.noreply.github.com Adds new builders for partial clang-tidy checks. (flutter/engine#44811)
2023-08-17 41930132+hellohuanlin@users.noreply.github.com [ios][ios17]fix auto correction highlight on top left corner (flutter/engine#44779)
2023-08-17 109111084+yaakovschectman@users.noreply.github.com [Windows] Delay enabling app lifecycle states until requested (flutter/engine#44238)
2023-08-17 dkwingsmt@users.noreply.github.com Move `viewConfiguration` parsing from `PlatformDispatcher` to `_hooks` (flutter/engine#44787)
2023-08-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 92c32df13d31 to 7e4e5796ee99 (2 revisions) (flutter/engine#44810)
2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from c4805a975ab3 to d0d390f9310d (2 revisions) (flutter/engine#44807)
2023-08-17 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from cPncZK6z8HmuOmQr_... to 7xOzci7fempFgHNk9... (flutter/engine#44809)
2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from efb5a5e0b78b to c4805a975ab3 (2 revisions) (flutter/engine#44795)
2023-08-17 skia-flutter-autoroll@skia.org Roll Skia from 11cb8cdd37c1 to efb5a5e0b78b (1 revision) (flutter/engine#44792)
2023-08-17 matanlurey@users.noreply.github.com Passthrough stderr results of clang_tidy when --enable-check-profile. (flutter/engine#44789)
2023-08-17 skia-flutter-autoroll@skia.org Roll Dart SDK from d6e1fca5dbdf to 92c32df13d31 (1 revision) (flutter/engine#44788)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from cPncZK6z8Hmu to 7xOzci7fempF

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 jsimmons@google.com,rmistry@google.com,zra@google.com 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
yaakovschectman added a commit that referenced this pull request Aug 29, 2023
… use for Windows lifecycle (#44827)

Supplant the temporary solution
#44238 with a more elegant
solution with am embedder API callback. The windows engine provides a
callback that enables graceful exit and app lifecycle when the platform
and lifecycle channels are listened to, respectively.

flutter/flutter#131616

## Pre-launch Checklist

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
…r#44238)

Await a platform message before sending lifecycle state updates so we
are not sending messages that do not get consumed by the framework.
In the _near_ future we hope to extend the embedder API to allow
registering callbacks called upon the framework registering a listener
to a channel, which would obviate this problem.

flutter/flutter#131616

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
… use for Windows lifecycle (flutter#44827)

Supplant the temporary solution
flutter#44238 with a more elegant
solution with am embedder API callback. The windows engine provides a
callback that enables graceful exit and app lifecycle when the platform
and lifecycle channels are listened to, respectively.

flutter/flutter#131616

## Pre-launch Checklist

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

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat

---------

Co-authored-by: Chris Bracken <chris@bracken.jp>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants