Skip to content

[Win32] Report no failure when a zoom change listener disposes the parent - #3952

Draft
HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:win32-zoom-change-disposed-parent
Draft

HeikoKlare wants to merge 1 commit into
eclipse-platform:masterfrom
HeikoKlare:win32-zoom-change-disposed-parent

Conversation

@HeikoKlare

Copy link
Copy Markdown
Contributor

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 ZoomChangeExceptionHandlingWin32Tests dispose a shell and a tab folder from a child's zoom change listener and fail without the change.

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Test Results (win32)

  185 files  ±0    185 suites  ±0   12m 54s ⏱️ - 3m 13s
5 351 tests +2  5 258 ✅ +2   93 💤 ±0  0 ❌ ±0 
5 569 runs  +4  5 284 ✅ +2  285 💤 +2  0 ❌ ±0 

Results for commit dc26a4f. ± Comparison against base commit 66873f7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant