Skip to content
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

[WiP] Change monitor-specific scaling setting before Display creation #1716

Conversation

HeikoKlare
Copy link
Contributor

⚠️ This PR currently only serves as basis for discussions

The method Display#setRescalingAtRuntime() allows to activate the monitor-specific scaling mechanism on Windows. This must, however, actually be activated before the Display is instantiated, like it is done during the Display constructor execution if the VM argument for global activation of monitor-specific scaling is specified. In consequence, calling #setRescalingAtRuntime() does not take the full intended effect.

This change deprecated the method (along with its according accessor #isRescalingAtRuntime()) and adds a new method to activate monitor-specific scaling on the Display class instead of an instance to be used for subsequent displays to be instantiated.

The method Display#setRescalingAtRuntime() allows to activate the
monitor-specific scaling mechanism on Windows. This must, however,
actually be activated before the Display is instantiated, like it is
done during the Display constructor execution if the VM argument for
global activation of monitor-specific scaling is specified. In
consequence, calling #setRescalingAtRuntime() does not take the full
intended effect.

This change deprecated the method (along with its according
accessor #isRescalingAtRuntime()) and adds a new method to activate
monitor-specific scaling on the Display class instead of an instance to
be used for subsequent displays to be instantiated.
Copy link
Contributor

Test Results

  140 files   -    345    140 suites   - 345   1m 13s ⏱️ - 9m 37s
4 029 tests  -    243  4 011 ✅  -    250  18 💤 + 8  0 ❌  - 1 
4 029 runs   - 12 348  4 011 ✅  - 12 260  18 💤  - 87  0 ❌  - 1 

Results for commit 4b00a40. ± Comparison against base commit 950ca8a.

This pull request removes 243 tests.
org.eclipse.swt.graphics.GCWin32Tests ‑ drawnElementsShouldScaleUpToTheRightZoomLevel
org.eclipse.swt.graphics.GCWin32Tests ‑ gcZoomLevelMustChangeOnShellZoomChange
org.eclipse.swt.graphics.PathWin32Tests ‑ testBoundsAreScaledWRTZoomLevel
org.eclipse.swt.graphics.PathWin32Tests ‑ testHandlesExistForEachZoomLevelInHashMap
org.eclipse.swt.graphics.PathWin32Tests ‑ testPathMustBeScaledOnZoomLevelChange
org.eclipse.swt.graphics.RegionWin32Tests ‑ testRegionMustBeScaledOnHandleOfScaledZoomLevel
org.eclipse.swt.graphics.TextLayoutWin32Tests ‑ testCalculateGetBoundsWithVerticalIndent
org.eclipse.swt.graphics.TextLayoutWin32Tests ‑ testGetBoundPublicAPIshouldReturnTheSameValueRegardlessOfZoomLevel
org.eclipse.swt.graphics.TransformWin32Tests ‑ testScaledTrasformMustHaveScaledValues
org.eclipse.swt.graphics.TransformWin32Tests ‑ testShouldHaveDifferentHandlesAtDifferentZoomLevels
…
This pull request skips 13 tests.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_Constructor_multipleInstantiationsInDifferentThreads[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_local[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_remote[browser flags: 0]
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_GlyphMetricsOnTab_Bug549110
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_bug551335_lostStyles
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_clipboardCarryover
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_lineStyleListener_invalidStyles_render
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_lineStyleListener_stylesAndRanges_render
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_lineStyleListener_styles_render
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_custom_StyledText ‑ test_setStyleRanges_render
…

@HeikoKlare
Copy link
Contributor Author

Closing in favor of #1719 and #1720

@HeikoKlare HeikoKlare closed this Jan 13, 2025
@HeikoKlare HeikoKlare deleted the display-monitor-specific-scaling branch January 13, 2025 20:45
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