Ensure windows are realized before the first frame received.#184956
Conversation
Regular and dialog windows created using the multi-window APIs receive their first frame from Flutter before they are relized. Explicitly ensure they are realized at creation to avoid this. Copied from the tooltip window code which was doing this correctly. Avoids warnings like: ** (com.example.multiple_windows:601828): CRITICAL **: 16:25:18.610: gboolean fl_compositor_present_layers(FlCompositor *, const FlutterLayer **, size_t): assertion 'FL_IS_COMPOSITOR(self)' failed
|
It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging. 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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group. |
There was a problem hiding this comment.
Code Review
This pull request adds explicit _window.realize() calls to RegularWindowControllerLinux and DialogWindowControllerLinux to address a platform-specific race condition. The review feedback suggests including explanatory comments for these calls to document their purpose, consistent with the repository's style guide regarding useful documentation.
|
@mattkae needs a re-review since I added some comments. |
Regular and dialog windows created using the multi-window APIs receive their first frame from Flutter before they are relized. Explicitly ensure they are realized at creation to avoid this. Copied from the tooltip window code which was doing this correctly.
Avoids warnings like:
** (com.example.multiple_windows:601828): CRITICAL **: 16:25:18.610: gboolean fl_compositor_present_layers(FlCompositor *, const FlutterLayer **, size_t): assertion 'FL_IS_COMPOSITOR(self)' failed