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?

Brian.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=141893

Attachment: 6640765.patch
Description: Binary data

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to