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

Only consider rescaling at runtime enabled when DPI awareness mode fits #1363

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

HeikoKlare
Copy link
Contributor

Activating rescaling at runtime requires a proper DPI awareness mode to be set. Currently, if setting the DPI awareness mode fails, rescaling may still be activated if the user requested to. With this change, setting the rescaling mode of a Display ensures that the correct DPI awareness for the UI thread is set and, in case an error occurs, the rescaling mode is not changed. It also adapts some faulty constants and provides according test cases for setting the rescaling behavior.

Copy link
Contributor

github-actions bot commented Jul 24, 2024

Test Results

   486 files  +8     486 suites  +8   8m 17s ⏱️ +27s
 4 150 tests +3   4 142 ✅ +3   8 💤 ±0  0 ❌ ±0 
16 357 runs  +3  16 265 ✅ +3  92 💤 ±0  0 ❌ ±0 

Results for commit 18f84cb. ± Comparison against base commit 5a7f375.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@fedejeanne fedejeanne left a comment

Choose a reason for hiding this comment

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

I think the current state would brake the API (the methods in Mac/Linux have a different return value than the one for Windows).

The rest is not critical.

@HeikoKlare HeikoKlare force-pushed the improve-setrescaling branch 2 times, most recently from 1a5d396 to c073cf7 Compare July 24, 2024 15:38
@HeikoKlare HeikoKlare marked this pull request as ready for review July 24, 2024 16:02
@HeikoKlare HeikoKlare force-pushed the improve-setrescaling branch from c073cf7 to a60e18d Compare July 24, 2024 16:02
@fedejeanne fedejeanne dismissed their stale review July 25, 2024 08:20

The breaking API changes have been addressed, the rest is not a blocker

@HeikoKlare HeikoKlare force-pushed the improve-setrescaling branch 2 times, most recently from 48ab566 to dec04c1 Compare July 29, 2024 14:40
Activating rescaling at runtime requires a proper DPI awareness mode to
be set. Currently, if setting the DPI awareness mode fails, rescaling
may still be activated if the user requested to. With this change,
setting the rescaling mode of a Display ensures that the correct DPI
awareness for the UI thread is set and, in case an error occurs, the
rescaling mode is not changed. It also adapts some faulty constants and
provides according test cases for setting the rescaling behavior.
@HeikoKlare HeikoKlare force-pushed the improve-setrescaling branch from dec04c1 to 18f84cb Compare July 29, 2024 14:40
@HeikoKlare HeikoKlare merged commit 24c8513 into eclipse-platform:master Jul 29, 2024
14 checks passed
@HeikoKlare HeikoKlare deleted the improve-setrescaling branch July 29, 2024 14:52
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