-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[Windows] Hide app until first frame is drawn #109816
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
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
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.
|
You'll need to request a test exemption from @Hixie. This code is integration-tested by the devicelab testing. You'll want to sync to tip-of tree and apply this change to the hello_world and platform_view samples that @yaakovschectman recently added Windows devicelab testing for in #109618. |
yaakovschectman
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
f4bf3a3 to
268b9d6
Compare
|
I migrated the new Windows app entry points! |
|
Can you elaborate on how this is tested? |
|
@loic-sharma @cbracken in iOS, Android, and Web, my package flutter_native_splash allows devs to display a splash screen before the first frame has been drawn. This is preferable to hiding the app because it gives the user immediate feedback that the app is launching and gives a better impression of device responsiveness. In your development of the Windows Flutter app architecture, can you include the ability for adding a native splash screen that can be displayed before the first frame is drawn? |
|
@jonbhanson thanks for your comment.
In the default app template, we use this to hide the main window for a few additional (and almost certainly unnoticeable) milliseconds until the first frame is ready in order to prevent the user seeing a very short flash of an unrendered view. A splash screen implementor would be able to use this callback to determine when the app is ready to display, which they can use as one input when determining when they'd like to take down the splash screen. A splash screen isn't particularly useful for covering up delays measured in milliseconds, hence why it's not default, but:
Please shout if any of these patches causes problems for your package. There's a separate bug (#41980) open for splash screen support. |
d91bc72 to
f46eb32
Compare
80251db to
348620f
Compare
|
I rebased this off of #110114 and added an integration test to verify the app starts with a hidden window that becomes visible after the first frame. @cbracken and @yaakovschectman, I've dismissed your previous approvals given the changes were substantial. Please take another look when available! 😄 |
yaakovschectman
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.
Still looks okay

Currently the Windows app is shown immediately with no content and a white background until the first frame is drawn. This change hides the app and makes it visible after that first frame has been drawn.
Part of #41980
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.