diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-07-17 14:19:14 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-07-18 03:48:01 +0000 |
| commit | b2a29280cbd3fcd825123e7636d511a06b2df242 (patch) | |
| tree | f2facf782cef35842aca61021e0b3f34d635f518 /render.c | |
| parent | wayland: fractional_scale_preferred_scale(): only push update if scale has changed (diff) | |
wayland: use physical DPI on fractional-scale capable compositors
With legacy scaling, we need to use a "scaled", or "logical" DPI
value, that is basically the real DPI value scaled by the monitor’s
scaling factor.
This is necessary to compensate for the compositor downscaling the
surface, for "fake" fractional scaling.
But with true fractional scaling, *we* scale the surface to the final
size. This means we should *not* use the scaled DPI, but the monitor’s
actual DPI.
To facilitate this, store both the scaled and the unscaled DPI value
in the monitor struct.
This patch also changes how we pick the DPI value. Before, we would
use the highest DPI value from all the monitors we were mapped
on. Now, we use the DPI value from the monitor we were *last* mapped
on (typically the window we’re dragging the window *to*).
Diffstat (limited to 'render.c')
0 files changed, 0 insertions, 0 deletions
