Repository navigation
[Win32] Report no failure when a zoom change listener disposes the parent - #3952
Draft
HeikoKlare wants to merge 1 commit into
Draft
HeikoKlare wants to merge 1 commit into
HeikoKlare wants to merge 1 commit into
Conversation
…rent When a shell moves to a monitor with a different scaling, an application listener reacting to the zoom change of a control may dispose the control's parent, for example to close the shell or to rebuild a tab folder. If that parent is a shell, a tab folder, a table, a tree, an expand bar, a cool bar or a combo, the zoom change reports a "Widget is disposed" failure to the application, although the application did nothing wrong. With this change, such a parent stops adapting itself to the new zoom once it notices that it has been disposed while it propagated the zoom change to its children, and the zoom change completes without a failure. Each of these widgets checks this in its own zoom change handling, right after its children have been adapted. A central check in Composite would need a new hook and a restructuring of every one of them, for a one-line check each. This covers the parent's own adaptation after its children. A child that follows the disposing one is handled by the separate change that determines the shell once before propagating the zoom change, and widgets that adapt to a zoom change in a listener of their own, such as CTabFolder, are left to a separate change. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
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.
When a shell moves to a monitor with a different scaling, an application listener reacting to the zoom change of a control may dispose the control's parent, for example to close the shell or to rebuild a tab folder. If that parent is a shell, a tab folder, a table, a tree, an expand bar, a cool bar or a combo, the zoom change reports a "Widget is disposed" failure to the application, although the application did nothing wrong: these widgets continue adapting themselves after propagating the zoom change to their children.
With this change, such a parent stops adapting itself once it notices that it has been disposed while it propagated the zoom change to its children, and the zoom change completes without a failure.
A child that follows the disposing one is handled by the separate change #3950, which determines the shell once before propagating the zoom change, and widgets that adapt to a zoom change in a listener of their own, such as
CTabFolder, are left to a separate change.How to test: the new tests in
ZoomChangeExceptionHandlingWin32Testsdispose a shell and a tab folder from a child's zoom change listener and fail without the change.🤖 Generated with Claude Code