Skip to content

[WIP] Per-screen scale factors on X11 using QT_SCREEN_SCALE_FACTORS

Qt computes the scale factor relative to the primary screen. This means we can support per-screen DPI on X11 by setting QT_SCREEN_SCALE_FACTORS appropriately, while keeping Xft.dpi synced to the primary screen's DPI. This means applications which don't read QT_SCREEN_SCALE_FACTORS use the scale of the primary screen. This is a good compromise, especially for those who either need fractional scaling or can't use wayland for various reasons.

WIP because this doesn't track changes of the primary screen and I'm not sure how to implement this the best way. The issue is that the QT_SCREEN_SCALE_FACTORS management is not done by the backend, but only by the KCM. Ideas welcome.

Test Plan: VM with multihead QXL. I can now assign a per-screen scale in the KCM and after a relogin applications scale correctly based on the screen they're on.

Started-by: Fabian Vogt fabian@ritter-vogt.de in https://phabricator.kde.org/D12405

FEATURE: 358689 FEATURE: 414866

Edited by Ilya Pominov

Merge request reports

Loading