Skip to content

Y20260120-1000

@HeikoKlare HeikoKlare tagged this 20 Jan 14:59
When instantiating a display, the DPI awareness for its UI thread was
set to PerMonitorV2 in case monitor-specific scaling is enabled. This
allowed to keep the default process DPI awareness at "system" (or
whatever the application used) with compatibility to
non-monitor-specific scaling.
With the future enablement of monitor-specific scaling by default and
the default DPI awareness becoming PerMonitorV2, it will be necessary to
restore the previous default (most reasonable) DPI awareness "System"
for the case that monitor-specific scaling is disabled.

This change implements the proper setting of DPI awareness in the
following way:
- By default, the UI thread of a display uses DPI awareness "system"
when monitor-specific scaling is disabled and "PerMonitorV2" when
monitor-specific scaling is enabled.
- If the user specifies a custom DPI awareness or a custom autoscale
mode via system property, the application's default DPI awareness will
be kept (specified by the application of JVM manifest).

This will result in reasonable default behavior (DPI awareness fitting
to the scaling mode) and still keeps the ability of customizing the
autoscaling and DPI awareness behavior.
Assets 2
Loading