Skip to content

[win32] Ensure correct DPI awareness for DnD #2261

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

Conversation

akoch-yatta
Copy link
Contributor

@akoch-yatta akoch-yatta commented Jun 24, 2025

This PR sets temporarily the DPI awareness of the thread to PerMonitorV2 if necessary, when DnD operations are executed. This is necessary as the process could be started with System Aware DPI mode which is inherited from the native methods related to DnD.

How to test

Its a bit complicated because its not reproducible with runtime. You will need to replace the three affected classes e.g. in the SWT jar of an I-Build with the changes in this PR to see the improvement.

fixes #2246

Copy link
Contributor

github-actions bot commented Jun 24, 2025

Test Results

   545 files  + 6     545 suites  +6   26m 58s ⏱️ - 8m 15s
 4 403 tests +37   4 385 ✅ +35   18 💤 +3  0 ❌ ±0 
16 733 runs  +37  16 593 ✅ +35  140 💤 +3  0 ❌ ±0 

Results for commit 87fffcc. ± Comparison against base commit edc5529.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta force-pushed the win32-ensure-dnd-with-dpi-awareness branch from db566e0 to 23b19b0 Compare June 26, 2025 10:50
This commit sets temporarily the DPI awareness of the thread to
PerMonitorV2 if necessary, when DnD operations are executed. This is
necessary as the process could be started with System Aware DPI mode
which is inherited from the native methods related to DnD.

fixes eclipse-platform#2246
@fedejeanne fedejeanne force-pushed the win32-ensure-dnd-with-dpi-awareness branch from 23b19b0 to 87fffcc Compare June 27, 2025 10:28
@fedejeanne fedejeanne merged commit d72a940 into eclipse-platform:master Jun 27, 2025
17 checks passed
@fedejeanne fedejeanne deleted the win32-ensure-dnd-with-dpi-awareness branch June 27, 2025 11:08
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.

Drop from other application not working on secondary monitors [win32] Drop from other application not working on secondary monitors
2 participants