< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XlibUtil.java
Print this page
@@ -36,10 +36,12 @@
import sun.awt.X11GraphicsConfig;
import sun.awt.X11GraphicsDevice;
import sun.awt.X11GraphicsEnvironment;
+import sun.java2d.pipe.Region;
+
/*
* This class is a collection of utility methods that operate
* with native windows.
*/
public class XlibUtil
@@ -412,8 +414,8 @@
return 1 << (7 + button);
}
}
static int scaleDown(int x, int scale) {
- return x / scale;
+ return Region.clipRound(x / (double)scale);
}
}
< prev index next >