< prev index next >

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

Print this page

        

@@ -36,10 +36,11 @@
 import java.awt.dnd.DragGestureEvent;
 import java.awt.dnd.InvalidDnDOperationException;
 
 import java.util.*;
 
+import sun.java2d.pipe.Region;
 import sun.util.logging.PlatformLogger;
 
 import sun.awt.dnd.SunDragSourceContextPeer;
 import sun.awt.dnd.SunDropTargetContextPeer;
 import sun.awt.SunToolkit;

@@ -809,12 +810,12 @@
         dndInProgress = false;
         cleanup(XConstants.CurrentTime);
     }
 
     public int scaleUp(int x) {
-        return x * windowScale;
+        return Region.clipRound(x * (double)windowScale);
     }
 
     public int scaleDown(int x) {
-        return x / windowScale;
+        return Region.clipRound(x / (double)windowScale);
     }
 }
< prev index next >