[Xcb] Reading XResources

Donald Ephraim Curtis dcurtis at cs.uiowa.edu
Tue Aug 11 14:53:21 PDT 2009


I hate to reply with such a short response but thanks so much!

(Tue, Aug 11, 2009 at 05:05:00PM -0400) Peter Harris <git at peter.is-a-geek.org>:
> On Tue, Aug 11, 2009 at 3:56 PM, Donald Ephraim Curtis wrote:
> > I am curious about getting the default DPI settings form the XServer.
> > It looks like they are calculated based on the settings of pixesls and
> > millimeters.  For now this seems OK and I can calculate them manually.
> > But it would be nice to pull this information from the Xserver rather
> > than calculating on my own, in the case that someone manually changes
> > the DPI settings...
> 
> Aside from the metric <=> imperial conversion, DPI is pixels per mm.
> You can't change one without changing the other.
> 
> The server does not have a separate DPI setting. Any UI you may have
> that claims to change the DPI is actually changing the mm value under
> the hood.
> 
> If you want the server to inform you when the user makes a change that
> may affect DPI, you can use the xcb_randr_select_input function
> (assuming the RandR extension is present).
> 
> Peter Harris


More information about the Xcb mailing list