src/macosx/classes/sun/lwawt/macosx/CDragSourceContextPeer.java
Print this page
*** 96,113 ****
// Get drag source component and its peer:
Component component = trigger.getComponent();
Point componentOffset = new Point();
ComponentPeer peer = component.getPeer();
// For a lightweight component traverse up the hierarchy to the first heavyweight
// which will be used as the ComponentModel for the native drag source.
! if (component.isLightweight()) {
Point loc = component.getLocation();
componentOffset.translate(loc.x, loc.y);
for (Component parent = component.getParent(); parent != null; parent = parent.getParent()) {
! if (parent.isLightweight() == false) {
peer = parent.getPeer();
break;
}
loc = parent.getLocation();
--- 96,114 ----
// Get drag source component and its peer:
Component component = trigger.getComponent();
Point componentOffset = new Point();
ComponentPeer peer = component.getPeer();
+
// For a lightweight component traverse up the hierarchy to the first heavyweight
// which will be used as the ComponentModel for the native drag source.
! if (!(component instanceof Window)) {
Point loc = component.getLocation();
componentOffset.translate(loc.x, loc.y);
for (Component parent = component.getParent(); parent != null; parent = parent.getParent()) {
! if (parent instanceof Window) {
peer = parent.getPeer();
break;
}
loc = parent.getLocation();