mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
X has various ways to deal with DPI but all of the current methods have some drawback (single global value, manually calculating from physical dimensions, etc.) What is lacking is a simple value per output that users and applications can use to communicate desired scaling values. Fortunately, a generic output property mechanism already exists. And they already send events whenever there is a change. So all we have to do is make an "official" property for people to agree on and enshrine it. In that case, all outputs can just always have the DPI property set to something. In most cases, this will be 96 (the default), but one could use the -dpi argument when launching or and that value will be used instead. The intention is that 96 is the base that is equivalent to 1x scaling. i.e. 192 would be 2x, 144 would be 1.5x and so on. xrandr or any other utility can modify this property at any time and applications can choose to use the number in a way that makes sense. Closes #208. Credit to @dec05eba for essentially coming up with the idea of using output properties. Signed-off-by: Dudemanguy <random342@airmail.cc>