DPI fix in xfsettings and xfce4-settings

Jannis Pohlmann jannis at xfce.org
Wed Sep 10 01:06:19 CEST 2008


Am Tue, 9 Sep 2008 21:05:46 +0200
schrieb Jannis Pohlmann <jannis at xfce.org>:

> Hey all,
> 
> I don't know if this is the final solution but I just committed a fix
> to xfsettingsd and xfce4-settings for a DPI problem I spotted.
> 
> Let's assume the DPI value set by the user is 96. 
> 
> Old state: xfce4-settings/appearance-settings/main.c saves 96 * 1024
> to xfconfd and xfsettingsd receives 96 * 1024 as DPI value and passes
> it to both, xrdb and X (via an XChangeProperty call). Now xrdb has
> this very high value and a lot of apps are broken (like any
> application that uses Qt3 or Qt4).
> 
> New state: xfce4-settings/appearance-settings/main.c saves 94 to
> xfconfd and xfsettingsd receives 96. It passes 96 to xrdb and 94 *
> 1024 to X (again via XChangeProperty). Now everything works.
> 
> However, this is critical: Please make sure that you have a
> realistic value (something between 50 and 150) in the '/Xft/DPI'
> property in ~/.config/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml.
> Otherwise you might encounter serious problems!

Oh, a better way would be to use xfconf-query to fix the setting after
the xfce4-settings and xfconf update:

  xfconf-query -c xsettings -p /Xft/DPI -s <your value here>

That should make xfsettingsd aware of the new value and makes sure you
don't lose the setting again when xfconfd overwrites the XML file.

  - Jannis



More information about the Xfce4-dev mailing list