JDK-7124262 : [macosx] Drag events go to a wrong child.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u4
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: os_x
  • CPU: generic,x86
  • Submitted: 2011-12-23
  • Updated: 2013-10-22
  • Resolved: 2012-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7u4 b16Fixed
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Description
http://java.net/jira/browse/MACOSX_PORT-693 submitted 2011/11/11 by Yuri Nesterenko
Run the attached example adapted from a test. Here InnerDropTargetPanel extends DropTargetPanel (which is a Panel). It (Inner one) has overridden all methods of DropTargetPanel necessary to implement DropTargetListener. 
A smaller InnerDropTargetPanel is added to the top of a bigger DropTargetPanel. Look at the printout: all is OK with relative sizes of them, as reported.
Now, Robot (and later you may do it manually) drags from a bottom Button, and drag messages start coming immediately to the InnerDropTargetPanel even if it is nor reached yet. Even more, when you reach the InnerDropTargetPanel, it does receive DropExit. It's really bizarre.

Comments
Affected version 7 replaced by affected version 7u4 because failures in aurora map on this bug.
22-10-2013

EVALUATION This happens because we are wrongly install native Drag recognized on the AWTView for the second time for the AWT components - hence the last added components will receive all the Drag events. The fix is to add the DropTarget listener only to the window peer if component is added to the window.
22-02-2012

EVALUATION Author: Yuri Nesterenko Date: 11/Nov/11 08:00 AM Build: b216 closed/java/awt/dnd/NestedHeavyweightDropTargetTest/NestedHeavyweightDropTargetTest
23-12-2011