Skip to content

[win32] Adjust wrong size after DPI fix in Shell #2165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

akoch-yatta
Copy link
Contributor

@akoch-yatta akoch-yatta commented May 20, 2025

This PR addresses an issue with the logic fixing a missing DPI change event from windows in the Shell#WM_WINDOWPOSCHANGED callback. It is no longer necessary, because the causing issue is that in some scenarios a sub shell is positioned on a random monitor. Solution is to adapt the nativeZoom of the sub Shell after the handle was created.

The PR adapts the implementation done in #1863 which was not correct.

To me this scenario only appears, when starting the RCP from the Explorer (e.g. not a command prompt!). I didn't event have the effect on all RCPs, but at least on the I-Build RCPs, e.g. I can reproduce it on https://download.eclipse.org/eclipse/downloads/drops4/I20250519-0040/download.php?dropFile=eclipse-SDK-I20250519-0040-win32-x86_64.zip. Newer ones will probably have the effect as well.

Primary Monitor 175%, secondary monitor 125%, have the IDE on the Primary monitor and hover over a class.
image

Important This PR sadly doesn't fully solve all issues as there is another issue hidden in Table, that can scale the scroll width/height of the Table to a value, that does not fit into the scaled Shell and scrollbars will appear, when they shouldn't

Copy link
Contributor

github-actions bot commented May 20, 2025

Test Results

   411 files   -   128     411 suites   - 128   24m 23s ⏱️ - 7m 4s
 4 398 tests +   37   4 380 ✅ +   35   18 💤 + 3  0 ❌  - 1 
12 613 runs   - 4 069  12 499 ✅  - 4 044  114 💤  - 24  0 ❌  - 1 

Results for commit 6c4bd61. ± Comparison against base commit a106143.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta marked this pull request as draft May 20, 2025 10:26
@akoch-yatta akoch-yatta force-pushed the win32-fix-dpi-shell-poschange branch from 47af98e to 45e3507 Compare May 20, 2025 13:10
@akoch-yatta akoch-yatta marked this pull request as ready for review May 20, 2025 13:15
@akoch-yatta akoch-yatta force-pushed the win32-fix-dpi-shell-poschange branch from 45e3507 to 3983021 Compare May 20, 2025 13:16
@HeikoKlare HeikoKlare force-pushed the win32-fix-dpi-shell-poschange branch from 3983021 to 008dce6 Compare May 20, 2025 13:25
This commit addresses an issue with the logic fixing a missing DPI
change event from windows in the Shell#WM_WINDOWPOSCHANGED callback. It
is no longer necessary, because the causing issue is that in some
scenarios a sub shell is positioned on a random monitor. Solution is to
adapt the nativeZoom of the sub Shell after the handle was created.
@akoch-yatta akoch-yatta force-pushed the win32-fix-dpi-shell-poschange branch from 008dce6 to 6c4bd61 Compare May 20, 2025 14:03
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