< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XMouseInfoPeer.java

Print this page

        

*** 28,37 **** --- 28,38 ---- import java.awt.Point; import java.awt.Window; import java.awt.GraphicsEnvironment; import java.awt.GraphicsDevice; import java.awt.peer.MouseInfoPeer; + import sun.awt.X11GraphicsDevice; import sun.awt.AWTAccessor; public class XMouseInfoPeer implements MouseInfoPeer {
*** 62,71 **** --- 63,78 ---- XlibWrapper.larg6, // yw_return XlibWrapper.larg7); // mask_return if (pointerFound) { point.x = Native.getInt(XlibWrapper.larg3); point.y = Native.getInt(XlibWrapper.larg4); + GraphicsDevice device = gds[i]; + if (device instanceof X11GraphicsDevice) { + int scale = ((X11GraphicsDevice) device).getScaleFactor(); + point.x = XlibUtil.scaleDown(point.x, scale); + point.y = XlibUtil.scaleDown(point.y, scale); + } return i; } } } finally { XToolkit.awtUnlock();
< prev index next >