<AWT Dev> Review Request for CR 8006941 [macosx] Deadlock in drag and drop

Petr Pchelko petr.pchelko at oracle.com
Wed Feb 6 01:18:21 PST 2013


Hello, AWT team.

Please review the fix for the issue: 
[macosx] Deadlock in drag and drop
http://bugs.sun.com/view_bug.do?bug_id=8006941

The webrev is available at:
http://cr.openjdk.java.net/~pchelko/8006941/webrev.00/

This changeset fixes multiple issues in DnD:
1. Before the methods of a Component and SwingUtilities were called from the appkit thread, which lead to a deadlock on the AWTTreeLock. Now this is removed.
2. Before the dragSourceEnter/dragSourceExit events were duplicated, triplicated or fired when they should not be fired and not fired when they should have been. Now I moved the generation of these events form native to Java level, because the native dropTarget is a content view of the window, so it does not know where the actual lightweight drop target is located. So after the fix these events work almost the same as in Windows, except for the notifications from the native applications. But they look impossible to implement due to the Cocoa restrictions.
3. Before the fix embedded mode with an NSView-based embeddedFrame was not supported. Now it is partially supported, it works but there are still issues with it, mostly with the coordinates calculations. I will file a separate bug for it. 


Thank you. 
With best regards. Petr.




More information about the awt-dev mailing list