1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-29 02:40:05 +00:00

Fixed a z-order bug when DragAndDrop-ing between plug-in windows

This commit is contained in:
Tom Poole 2018-07-18 16:34:19 +01:00
parent 4280b51d09
commit 9dde83e662

View file

@ -249,10 +249,12 @@ private:
for (auto i = desktop.getNumComponents(); --i >= 0;)
{
auto* c = desktop.getComponent(i);
auto* desktopComponent = desktop.getComponent (i);
auto localPoint = desktopComponent->getLocalPoint (nullptr, screenPos);
if (auto* hit = c->getComponentAt (c->getLocalPoint (nullptr, screenPos)))
return hit;
if (auto* c = desktopComponent->getComponentAt (localPoint))
if (c->hitTest (localPoint.getX(), localPoint.getY()))
return c;
}
return nullptr;