Re:How X Window Managers Work, and How to Write One (2014)
by md8z on Wednesday November 03, 2021 @01:15PM
(#29097577)
You really don't want to use Xrandr information to do scaling, it's not accurate. A better way would be to set a property on the window and have the compositor read that, AFAIK this is the solution that the Kwin developers were working on.
The support of hidpi scaling is something Toolkits have to manage (on both Wayland and X11). On X11 all the necessary pitch information to do so is available via the xrandr extension.