]> git.sur5r.net Git - i3/i3/commitdiff
add log messages for the detected DPI
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 24 Jun 2014 07:56:31 +0000 (09:56 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 24 Jun 2014 07:56:31 +0000 (09:56 +0200)
Currently, the DPI is only logged when pango fonts are used, which is
often not the case when people report problems with the DPI detection.

src/main.c

index c839cf3bc93e5dfa0bae22adc8f533211511856a..66090dae207c021ec70d0e883044c1d8faa9ad4c 100644 (file)
@@ -558,6 +558,10 @@ int main(int argc, char *argv[]) {
     colormap = root_screen->default_colormap;
 
     DLOG("root_depth = %d, visual_id = 0x%08x.\n", root_depth, 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("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);
     xcb_query_pointer_cookie_t pointercookie = xcb_query_pointer(conn, root);