-
Notifications
You must be signed in to change notification settings - Fork 6k
Win32: Add lifecycle channel support #29288
Conversation
3d6b2bb to
a7befa9
Compare
b1a8771 to
2962099
Compare
a7befa9 to
2bd6b84
Compare
|
I resolved the conflicts and this is ready for review. |
|
We need this desperately. Do we have a commit for MacOS as well? |
|
@OllyDixon Sorry, this PR is for Windows only (and I don't have Mac now), but StringMessageCodec in this PR should help its implementation for MacOS and other platforms too. |
2bd6b84 to
b8baed8
Compare
|
@cbracken I ping softly (sorry if this was already triaged and is just low priority) |
b8baed8 to
5517fb1
Compare
5517fb1 to
7c61755
Compare
|
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
7c61755 to
a648c2e
Compare
|
Gold has detected about 27 new digest(s) on patchset 5. |
|
Cross-referencing flutter/flutter#65061 since it's related. |
a648c2e to
a141b01
Compare
|
`` |
This reverts commit 180c822fce24b9c7b003ee182d04f14e4ac24c4d.
4738576 to
adfa8f3
Compare
|
@cbracken @loic-sharma This is ready for review now. Please review this at your convenience. |
| void FlutterWindow::OnSetFocus() { | ||
| has_focus_ = true; | ||
| SendLifecycleEvent(); | ||
| } | ||
|
|
||
| void FlutterWindow::OnKillFocus() { | ||
| has_focus_ = false; | ||
| SendLifecycleEvent(); | ||
| } |
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 it possible to receive a WM_SETFOCUS or WM_KILLFOCUS message even after the window isn't visible? Would that scenario result in a pause event? If so, that seems undesirable.
|
Would it be possible to add an integration test to the engine using |
|
This is a useful PR, and I'm aware that we very much need lifecycle event support, but I'm concerned that if we do this without a coherent strategy for all of the platforms that we'll end up with a fractured API for it that will require special handling for each platform on the framework side. Can we hold off on this just a little longer until we have a unified design? |
|
@gspencergoog I agree with that, but I don't have much time to fix this now. |
|
No worries! Your work will help inform the unified design, thank you for taking a first stab at this problem |
This PR adds flutter/lifecycle channel support for win32
and winuwp(removed), and enable apps to receive window focused/minimized event.This PR adds
StringMessageCodectoshell/platform/common.This PR will support part of flutter/flutter#103637
No changes in
flutter/tests.Pre-launch Checklist
writing and running engine tests.
///).Example (
main.dart, modified fromWidgetsBindingObserverexample in docs):This app displays last event and print it to stdout.