<AWT Dev> Possible fix for 6640765: Drop target management problem in XEmbeddedFramePeer

Brian de Alwis bsd at mt.ca
Wed Sep 4 14:00:56 PDT 2013

I'm helping with an Eclipse-based project that uses Eclipse's SWT_AWT facility to embed Swing within SWT.  SWT_AWT uses an embedded frame to host Swing/AWT content.  In this application, we frequently have several SWT_AWT-based editors open simultaneously, that support drag-and-drop, and have been hitting bug 6640765 (Eclipse bug 141893 [1]).  This is a Linux-specific bug where drops, when displaying several SWT_AWT embedded-frames, use the wrong frame.

The original reporter on the Eclipse bug report identified the problem as something to do with XEmbeddedFramePeer.  I've tried to come up with a patch that solves the issue against JDK7 (attached).  I'm not very confident of the patch's correctness, but it seems to work in my application workflows.  I found I had to ensure that only a single embedded frame was registered as a drop target site.

I fully admit that I am neither a proficient AWT hacker, nor with deep understanding of X11 DND.  Could someone with X11/AWT background provide some guidance as to whether this seems like a worthy fix, and pointers for how to build a unit test for this behaviour?


[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=141893
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6640765.patch
Type: application/octet-stream
Size: 3494 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20130904/d30d65e4/6640765.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4109 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20130904/d30d65e4/smime.p7s 

More information about the awt-dev mailing list