Use screen coordinates since we can have lots of components for the same target.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1670 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
andrzej
2005-07-06 02:46:03 +00:00
parent 35a851ef9a
commit 4f2ef4b4a1
2 changed files with 4 additions and 4 deletions
@@ -432,8 +432,6 @@ public class DnDManager
return;
}
Component lastComp = _lastComp;
// reset cursors
clearComponentCursor(); // _lastComp cleared here
_topComp.setCursor(_topCursor);
@@ -441,8 +439,8 @@ public class DnDManager
// get the last target seen...
if (_lastTarget != null) {
// determine drop location
Point pos = SwingUtilities.convertPoint(event.getComponent(),
event.getPoint(), lastComp);
Point pos = event.getPoint();
SwingUtilities.convertPointToScreen(pos, event.getComponent());
_lastTarget.dropCompleted(_source, _data[0], pos);
_source.dragCompleted(_lastTarget);
}
@@ -30,6 +30,8 @@ public interface DropTarget
/**
* Called when the drop is actually executed.
*
* @param pos the location of the drop in screen coordinates
*/
public void dropCompleted (DragSource source, Object data, Point pos);
}