From af94b565a66465b07617c147961d1c92335d6f44 Mon Sep 17 00:00:00 2001 From: "blizzard%redhat.com" Date: Mon, 4 Nov 2002 21:32:36 +0000 Subject: [PATCH] Bug #178045. floating point error when using gtk2 on startup. Make sure to check if the gtk dpi is greater than zero. r=owen sr=scc a=jesup --- gfx/src/gtk/nsDeviceContextGTK.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/src/gtk/nsDeviceContextGTK.cpp b/gfx/src/gtk/nsDeviceContextGTK.cpp index 43b84d3c67a..28361c9bb32 100644 --- a/gfx/src/gtk/nsDeviceContextGTK.cpp +++ b/gfx/src/gtk/nsDeviceContextGTK.cpp @@ -1030,8 +1030,8 @@ GetOSDPI(void) NULL); } - if (dpi) - return NSToCoordRound(dpi / PANGO_SCALE); + if (dpi > 0) + return NSToCoordRound(dpi / 1024.0); // try to get it from xft PRInt32 xftdpi = GetXftDPI();