Fix WindowCollection removal and non-materialized window objects hanging Application#11766
Open
h3xds1nz wants to merge 2 commits into
Open
Fix WindowCollection removal and non-materialized window objects hanging Application#11766h3xds1nz wants to merge 2 commits into
h3xds1nz wants to merge 2 commits into
Conversation
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.
Fixes #4204
Fixes #11610
Description
Fixes removal of
Windowobjects during explicit app shutdown (forced either viaDispatchercallback or when an app-shutdown condition is detected) and also alters behaviour to shutdown the app when there are non-materialized window objects (windows that don't have / never had aHWND) to stop the process from hanging on a programmer's error.Customer Impact
I guess customers will be happier this time around that the LLM's poor job is saved by complementary logic? Even though it locks per each closing window now, previously it was an allocation to check the
Count(sinceApp.Windowscreates a copy), so there's no real difference. Bail is expected on first item in the loop.Regression
Both has been there since the dark days, so, no.
Testing
Repro in both issues.
Risk
Unlike others, this is a newly crafted fix, so besides the repros it's untested. It changes the behaviour; if you were using
OnLastWindowClose(default) and created aWindowto hang your app without actually callingEnsureHandle(which you should do), then after merging this you'll be surprised.Microsoft Reviewers: Open in CodeFlow