renderer: pump events until the window is exposed on creation - #1818
Open
ranawaqas-ai wants to merge 1 commit into
Open
ranawaqas-ai wants to merge 1 commit into
ranawaqas-ai wants to merge 1 commit into
Conversation
macOS never delivers the first expose event unless the event loop runs before the first frame is drawn. Qt then refuses every buffer flush with "exposed size does not match geometry", so the window never receives content and stays 0x0 and invisible. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
TheJJ
approved these changes
Sep 21, 2026
TheJJ
left a comment
Member
There was a problem hiding this comment.
thanks. while this also seems a weird workaround i think we can take it in for now.
i plan on switching to using a real qt window and then rendering inside it - our other way round has really caused too many problems.
Member
|
could you make the ci pass here as well, please? |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On macOS the window never receives its first expose event, because nothing runs the event loop between
setVisible(true)and the first rendered frame. Qt then refuses every buffer flush withWindow exposed size does not match geometry (yet). Skipping flush to avoid visual artifacts., logged over 300,000 times in seven seconds, so the window never gets content and stays 0x0 and invisible.Reproduced on macOS 27 (arm64) with Qt 6.11.2 on every renderer demo. A plain QML window displays correctly on the same machine, so the problem is specific to this window setup rather than Qt on macOS.
Pumping events until
isExposed()returns true fixes it. Verified withrenderer_demo 0andrenderer_demo 3, both of which now open a visible 800x600 window.The
copying.mdauthors entry is included in #the shader PR from the same branch series.make checkmergepasses.