Don't despawn render window entities when the raw handle is removed - #25684
Open
beicause wants to merge 1 commit into
Open
Don't despawn render window entities when the raw handle is removed#25684beicause wants to merge 1 commit into
beicause wants to merge 1 commit into
Conversation
Removing `RawHandleWrapper` is not necessarily terminal: on Android the native window is destroyed (and its handle removed) when the app suspends, but the window entity survives and is given a new handle on resume. Despawning the synced render entity left the main world entity's `SubEntity` pointing at a dead entity, and the next round of extraction panicked with `Entity despawned` when reusing it. The render entity is only ever despawned by the entity sync system once the main world window entity is actually destroyed. Tear down the surface and drop the extracted window data instead; extraction and `create_surfaces` recreate them whenever the window has a new `RawHandleWrapper`.
beicause
force-pushed
the
fix-android-window-resume
branch
from
September 4, 2026 14:47
b054968 to
d787cc7
Compare
Zeophlite
approved these changes
Sep 6, 2026
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.
Objective
Fixes #25682
Solution
Don't despawn render window entities when the raw handle is removed. Instead remove the window components.
Testing
I tested the android example