This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[Windows] handle repaint message in FlutterView window#34306
Merged
loic-sharma merged 4 commits intoflutter:mainfrom Jul 13, 2022
Merged
[Windows] handle repaint message in FlutterView window#34306loic-sharma merged 4 commits intoflutter:mainfrom
loic-sharma merged 4 commits intoflutter:mainfrom
Conversation
loic-sharma
reviewed
Jul 1, 2022
| EXPECT_CALL(delegate, OnWindowRepaint()).Times(1); | ||
|
|
||
| win32window.InjectWindowMessage(WM_PAINT, 0, 0); | ||
| } |
Member
There was a problem hiding this comment.
The inject window message is really nice! 🏅
Could you also add a test that calls OnPaint directly too since it's a public API?
loic-sharma
reviewed
Jul 6, 2022
loic-sharma
reviewed
Jul 6, 2022
bea521c to
f2b441b
Compare
loic-sharma
approved these changes
Jul 8, 2022
Member
loic-sharma
left a comment
There was a problem hiding this comment.
LGTM - thanks for fixing this!
Contributor
Author
Thanks for the review. After merging this PR, I can add another PR to change the implementation of FlutterWindowsView::ForceRedraw() to ScheduleFrame. |
stuartmorgan-g
approved these changes
Jul 12, 2022
Contributor
stuartmorgan-g
left a comment
There was a problem hiding this comment.
LGTM with comment nit.
f2b441b to
010591d
Compare
Contributor
Author
|
Rebased onto latest main branch. |
Member
|
Thanks for contributing this fix! |
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Jul 13, 2022
betrevisan
pushed a commit
to betrevisan/engine
that referenced
this pull request
Jul 15, 2022
This PR will fix the blank FlutterView issue by handling the repaint message in FlutterView window. Currently, WM_PAINT msg is not handled in flutter window and the default WindowProc will do nothing but paint the background. In some user cases, e.g., hide/show/min/max the app window, this can result in blank FlutterView if the content is static and there are no running animation. Addresses flutter/flutter#101339 Addresses flutter/flutter#102030
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR will fix the blank FlutterView issue by handling the reapint message in FlutterView window.
Currently, WM_PAINT msg is not handled in flutter window and the default WindowProc will do nothing but painting the background. In some user cases, e.g., hide/show/min/max the app window, this will cause blank FlutterView described in the following 2 issues, as the framework has no knowledge of it and will not trigger a new frame if the content is static and there are no running animation.
This PR will fix:
flutter/flutter#101339
flutter/flutter#102030
Pre-launch Checklist
writing and running engine tests.
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.