<AWT Dev> Review request: 8005405 : [macosx] Drag and Drop: wrong animation when dropped outside any drop target.

Petr Pchelko petr.pchelko at oracle.com
Wed Jan 23 06:35:41 PST 2013

Hello, AWT team.

Please, review the fix for the issue
The fix is available at:

2 problem existed: 
	1. Calculation of the dragOrigin and componentOffset relied on the component.isLightweight() method, which considers all the AWT components heavyweight on Mac, however we really wanted there to find the component which has a real NSView or NSWindow under it. Replacing it with instanceof Window solves the problem.
	2. On the native level the dragOrigin and location of the dragEvent were calculated without respect to the fact than Cocoa coordinate system is flipped.

The fix is tested on toy apps with both AWT and Swing components. Also I have run netbeans on the JDK with this fix and all drag images look good.

With best regards. Petr.

More information about the awt-dev mailing list