Searching a station when two stations are under the mouse, each in a JFrame

Detected on Version 1.0.8 (16.Oct.2010) - never tested on older versions.

Test case (joined “TestFrame.java”) :

  • Create Two frames, each containing a DockStation, each Station containing a Dockable
  • Display these frames one over the other
  • Drag the Dockable from the top frame then drop the Dockable into the same frame => the Dockable is dropped into the other frame (not visible because under)

This test case can be reproduce too with 3 same Frames :
Initial situation : Frame 1 alone, Frame 2 and 3 one over the other

  • Drag the Dockable from the frame 1 to the frame 2 => the draged dockable is dropped into frame 3

I solve this problem by allowing drop dockstation only if under mouse. I haven’t study all the code and can’t know if it’s the right location to do the correction. This proposition is in the joined file “DefaultDockRelocator.java” (method isWindowCompatibleStation).

Thanks, I’ll add the patch to the framework.

[Edit: things are a bit more complex as there are stations that react to the mouse even if it is not directly above them. But I think using the mouse-position to order the stations should already solve most problems.]