Skip to content

Respect physical display sizes in xfce4-settings insofar as practical

Glen Whitney requested to merge gwhitney/xfce4-settings:preserve_dpi into master

Created merge request per discussion in old bugzilla #10633. (Sorry for the delay, urgent personal matters intervened.)

Prior to this change, on startup, xfsettingsd would always set the nominal physical dimensions of the (typically sole) virtual screen to correspond to 265-micron pixel pitch (96 dpi). However, as physical displays with much smaller pixel pitches become common, this doesn't make much sense when all of the physical devices attached have significantly smaller pitches (even if they don't all match) and especially problematic when there is a single output (a relatively common case) with a very different pixel pitch. In this case, the physical dimensions are very meaningful, and altering them can lead to such symptoms as poorly chosen font sizes and widely varying font sizes among different applications.

This commit always respects any physical dimensions reported by xrandr in the case of a single output and makes a best effort to patch together a ballpark reasonable physical dimension in the case of multiple outputs. (In any case, the computed effective physical dimensions will always reflect a pixel pitch that is between the smallest and largest pixel pitches reported by xrandr for any outputs.)

Resolves issue #34 (formerly XFCE bugzilla issue 10633 and its various duplicates).

Edited by Romain Bouvier

Merge request reports