Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

@akoch-yatta akoch-yatta commented Oct 11, 2024

This commit moves the initialization of the thread DPI awareness into the creation method. It was done too late before which resulted in all calls do Display::messageProc being executed with the wrong DPI awarness if the thread dpi awareness differs from the process DPI awareness.

##How to test

  1. Configure your execution javaw.exe to be started with system DPI awareness (https://www.eclipse.org/swt/faq.php#winexternalmanifestfile) :
    dpi1:dpiAwaretrue</dpi1:dpiAware>
    dpi2:dpiAwarenesssystem</dpi2:dpiAwareness>
  2. Prepare a two monitor setup, e.g primary 100% and secondary 200%
  3. Start the ControlExample with
    -Dswt.autoScale=quarter
    -Dswt.autoScale.updateOnRuntime=true
  4. Move the example to the secondary monitor
  5. Change the zoom of the primary monitor
    The shell will be layouted strange in some places,e.g. the right part in the ButtonTaB
    image

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2024

Test Results

   486 files  ±0     486 suites  ±0   7m 39s ⏱️ -21s
 4 159 tests ±0   4 151 ✅ ±0   8 💤 ±0  0 ❌ ±0 
16 390 runs  ±0  16 298 ✅ ±0  92 💤 ±0  0 ❌ ±0 

Results for commit 2ccae67. ± Comparison against base commit a4fe53b.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

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

Change looks sound and works as expected.

This commit moves the initialization of the thread DPI awareness into the creation method. It was done too late before which resulted in all calls do Display::messageProc being executed with the wrong DPI awarness of the thread dpi awareness differs from the process DPI awareness.

Contributes to eclipse-platform#62 and eclipse-platform#131
@HeikoKlare HeikoKlare force-pushed the fix-initialization-dpiawareness branch from 02dc825 to 2ccae67 Compare October 11, 2024 08:25
@HeikoKlare HeikoKlare merged commit 552167f into eclipse-platform:master Oct 11, 2024
12 checks passed
@akoch-yatta akoch-yatta deleted the fix-initialization-dpiawareness branch October 11, 2024 13:22
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.

2 participants