Skip to content

Conversation

@HeikoKlare
Copy link
Contributor

@HeikoKlare HeikoKlare commented Jan 12, 2026

By now, SWT had monitor-specific scaling on Windows disabled by default and used the existing, single-zoom HiDPI support. There are good reasons to now change the default of SWT to have monitor-specific scaling enabled:

  • Eclipse applications default to have monitor-specific scaling enabled for several months now, so SWT and Eclipse default behaviors are different
  • With default JVM settings, pure SWT application have no proper scaling as the existing HiDPI support requires DPI awareness "System" to function properly whereas the JVM default is "PerMonitorV2" and requires the application to scale on its own. So by default, SWT applications currently have no scaling at all
  • The feature has matured throughout the last year with it being the default for Eclipse application for several months now.

This change adapts the SWT default to enable monitor-specific scaling on Windows.

How to test

Just run any SWT snippet and move it between monitors of different zooms. It will adapt it's scale while it did not do prior to this PR.

Feedback welcome

I would appreciate feedback on whether we agree on changing this default. I propose to merge this before M2 so that people get aware it early enough. When merging, I will also create an according N&N.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 13, 2026

Test Results

  113 files   - 31    113 suites   - 31   7m 15s ⏱️ - 8m 23s
4 636 tests  - 43  4 607 ✅  - 48  29 💤 +5  0 ❌ ±0 
  326 runs   - 88    323 ✅  - 86   3 💤  - 2  0 ❌ ±0 

Results for commit e359a33. ± Comparison against base commit 7934e5a.

This pull request removes 43 tests.
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_dollarSign
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_emptyString
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letterA
AllGTKTests Test_GtkConverter ‑ test_HeuristicASCII_letters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16LE_null
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_AsciiLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_Asciiletter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_LotsOfLetters
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letter
AllGTKTests Test_GtkConverter ‑ test_HeuristicUTF16_letters
…
This pull request skips 8 and un-skips 1 tests.
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_invalid_url_local
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_invalid_url_remote
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_post_connection_closes_prematurely
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_post_file_url
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_setUrl_post_invalid_url
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_getContentsBothClipboards
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_Clipboard ‑ test_setContentsBothClipboards
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_dnd_FileTransfer ‑ test_nativeToJava
org.eclipse.swt.tests.junit.Test_org_eclipse_swt_browser_Browser ‑ test_StatusTextListener_hoverMouseOverLink

♻️ This comment has been updated with latest results.

@merks
Copy link
Contributor

merks commented Jan 13, 2026

I'll be happy with a new default because the installer won't need a -D option then. I was testing that the other day and it's much nicer with the new behavior.

@HeikoKlare HeikoKlare force-pushed the monitorspecificscaling-default branch from 91adb29 to 1c9ab79 Compare January 13, 2026 08:18
@vogella
Copy link
Contributor

vogella commented Jan 13, 2026

Of course +1, defaults should be using the best functionality and it's unlikely that a user "only wants his menu (done automatically by the os)" scaled.

By now, SWT had monitor-specific scaling on Windows disabled by default
and used the existing, single-zoom HiDPI support. There are good reasons
to now change the default of SWT to have monitor-specific scaling
enabled:
- Eclipse applications default to have monitor-specific scaling enabled
for several months now, so SWT and Eclipse default behaviors are
different
- With default JVM settings, pure SWT application have no proper scaling
as the existing HiDPI support requires DPI awareness "System" to
function properly whereas the JVM default is "PerMonitorV2" and requires
the application to scale on its own. So by default, SWT applications
currently have no scaling at all
- The feature has matured throughout the last year with it being the
default for Eclipse application for several months now.

This change adapts the SWT default to enable monitor-specific scaling on
Windows.
@HeikoKlare HeikoKlare force-pushed the monitorspecificscaling-default branch from 1c9ab79 to e359a33 Compare January 19, 2026 09: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.

Enable monitor-specific scaling by default in SWT

3 participants