Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

In multiple situation, relayouting due to DPI change events does not work as expected:

  • When opening child shells, they may be relayouted after being opened if their position changed to a different monitor between the OS handle was created and a new position was set
  • When reparenting controls between different shells, the target shell may not be properly relayout at all

Since the user experience when performing these two cases asynchronously is not good anyway (e.g., reparenting leads to unexpected asynchronous relayouting operations), this change adapts the two use cases to process the DPI change synchronously.

Fixes #2608

This is an addition to #2636, which already fixes some of the issue (in the best possible way) while this resolved the remaining issues (such as broken perspective switching) on top.

You can test this by having two monitors with different zoom, starting an SDK product and switching perspectives on either of the monitors. Without this fix, you will see the broken layout as described here: #2608 (comment)
In addition, you can open a child shell (e.g., an "Open Type" dialog) and move it to a different monitor, such that it reopens on that other monitor afterwards. Without this fix, when reopening the dialog you will see effects such as in #2608 (comment).

@github-actions
Copy link
Contributor

github-actions bot commented Oct 16, 2025

Test Results

  115 files  ±0    115 suites  ±0   13m 26s ⏱️ + 1m 36s
4 554 tests ±0  4 538 ✅ ±0  16 💤 ±0  0 ❌ ±0 
  311 runs  ±0    308 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit fcfd25f. ± Comparison against base commit 905fdb9.

♻️ This comment has been updated with latest results.

@HeikoKlare HeikoKlare marked this pull request as ready for review October 16, 2025 13:52
…lipse-platform#2608

In multiple situation, relayouting due to DPI change events does not
work as expected:
- When opening child shells, they may be relayouted after being opened
if their position changed to a different monitor between the OS handle
was created and a new position was set
- When reparenting controls between different shells, the target shell
may not be properly relayout at all

Since the user experience when performing these two cases asynchronously
is not good anyway (e.g., reparenting leads to unexpected asynchronous
relayouting operations), this change adapts the two use cases to process
the DPI change synchronously.

Fixes eclipse-platform#2608
Copy link
Contributor

@akoch-yatta akoch-yatta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes sound reasonable for the scenarios it describes. I tested it with different monitor setting and scenarios like opening child shells, triggering parent changes or moving shells between monitors and it works as expected and I didn't find a regression

@HeikoKlare HeikoKlare merged commit ac18a18 into eclipse-platform:master Oct 16, 2025
17 checks passed
@HeikoKlare HeikoKlare deleted the issue-2608 branch October 16, 2025 14:43
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.

Fix for broken layout after perspective switcher is used Shells relayout due to DPI change on opening Dialogs open with wrong zoom level

2 participants