Use Xft.dpi for DPI if available.

fixes #2465
This commit is contained in:
Ingo Bürk
2016-09-23 15:09:49 +02:00
parent 1437271e65
commit cb1fcfed6a
8 changed files with 75 additions and 14 deletions

View File

@ -503,10 +503,11 @@ int main(int argc, char *argv[]) {
visual_type = get_visualtype(root_screen);
}
init_dpi();
DLOG("root_depth = %d, visual_id = 0x%08x.\n", root_depth, visual_type->visual_id);
DLOG("root_screen->height_in_pixels = %d, root_screen->height_in_millimeters = %d, dpi = %d\n",
root_screen->height_in_pixels, root_screen->height_in_millimeters,
(int)((double)root_screen->height_in_pixels * 25.4 / (double)root_screen->height_in_millimeters));
DLOG("root_screen->height_in_pixels = %d, root_screen->height_in_millimeters = %d\n",
root_screen->height_in_pixels, root_screen->height_in_millimeters);
DLOG("One logical pixel corresponds to %d physical pixels on this display.\n", logical_px(1));
xcb_get_geometry_cookie_t gcookie = xcb_get_geometry(conn, root);