--- old/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c 2016-02-23 11:54:31.701720754 +0530 +++ new/src/java.desktop/unix/native/libawt_xawt/awt/awt_GraphicsEnv.c 2016-02-23 11:54:31.509720752 +0530 @@ -43,7 +43,7 @@ #include #include #include - +#include "systemScale.h" #include #include "awt_GraphicsEnv.h" @@ -2083,17 +2083,6 @@ * End DisplayMode/FullScreen support */ -int getScale(const char *name) { - char *uiScale = getenv(name); - if (uiScale != NULL) { - double scale = strtod(uiScale, NULL); - if (errno == ERANGE || scale < 1) { - return -1; - } - return (int) scale; - } - return -1; -} /* * Class: sun_awt_X11GraphicsDevice @@ -2108,12 +2097,12 @@ static int scale = -2.0; if (scale == -2) { - scale = getScale("J2D_UISCALE"); + scale = getNativeScaleFactor("J2D_UISCALE"); } if (scale >= 1) { return scale; } - return getScale("GDK_SCALE"); + return getNativeScaleFactor("GDK_SCALE"); }