Hmm - you’re right, it should recursively ask the parent comps if they’re interested. How about this tweak to juce_DragAndDropContainer.cpp:
[code] DragAndDropTarget* findTarget (const int screenX, const int screenY,
int& relX, int& relY)
{
Component* hit = getParentComponent();
if (hit == 0)
{
hit = Desktop::getInstance().findComponentAt (screenX, screenY);
}
else
{
int rx = screenX, ry = screenY;
hit->globalPositionToRelative (rx, ry);
hit = hit->getComponentAt (rx, ry);
}
while (hit != 0)
{
DragAndDropTarget* const ddt = dynamic_cast <DragAndDropTarget*> (hit);
if (ddt != 0)
{
relX = screenX;
relY = screenY;
hit->globalPositionToRelative (relX, relY);
if (ddt->isInterestedInDragSource (dragDesc))
return ddt;
}
hit = hit->getParentComponent();
}
return 0;
}[/code]
It does use the normal hit-testing mechanism to decide which component the mouse is over, so if you’ve turned off mouse interception, that comp wouldn’t be able to get dropped-on. It has to work this way in case there are funny-shaped components with odd hit-test regions.