Index: nsThebesDeviceContext.cpp =================================================================== RCS file: /cvsroot/mozilla/gfx/src/thebes/nsThebesDeviceContext.cpp,v retrieving revision 1.76 diff -d -u -p -r1.76 nsThebesDeviceContext.cpp --- nsThebesDeviceContext.cpp 16 Apr 2008 03:27:03 -0000 1.76 +++ nsThebesDeviceContext.cpp 17 Apr 2008 17:25:31 -0000 @@ -170,8 +170,9 @@ nsThebesDeviceContext::SetDPI() } #if defined(MOZ_ENABLE_GTK2) - float screenWidthIn = float(::gdk_screen_width_mm()) / 25.4f; - PRInt32 OSVal = NSToCoordRound(float(::gdk_screen_width()) / screenWidthIn); + GdkScreen *screen = gdk_screen_get_default(); + (void)gtk_settings_get_for_screen(screen); // Make sure init is run so we have a resolution + PRInt32 OSVal = (PRInt32) gdk_screen_get_resolution(screen); if (prefDPI == 0) // Force the use of the OS dpi dpi = OSVal;