Comment 20 for bug 310353

Revision history for this message
In , Federico Mena-Quintero (federico-novell) wrote :

Created an attachment (id=106649)
dpi.c

This is what I'm using in gnome-settings daemon. You want to look at get_dpi_from_gconf_or_x_server(). First, I see if the DPI value is set in GConf; if so, this means that we should use the user's preference. If not, I compute the DPI from the screen's dimensions and then use a fallback value if it is outside a valid range.