|
|
|
@@ -147,12 +147,12 @@ public: |
|
|
|
|
|
|
|
Point<float> localToGlobal (Point<float> relativePosition) override
|
|
|
|
{
|
|
|
|
return relativePosition + getScreenPosition (false).toFloat();
|
|
|
|
return localToGlobal (*this, relativePosition);
|
|
|
|
}
|
|
|
|
|
|
|
|
Point<float> globalToLocal (Point<float> screenPosition) override
|
|
|
|
{
|
|
|
|
return screenPosition - getScreenPosition (false).toFloat();
|
|
|
|
return globalToLocal (*this, screenPosition);
|
|
|
|
}
|
|
|
|
|
|
|
|
using ComponentPeer::localToGlobal;
|
|
|
|
@@ -231,8 +231,11 @@ public: |
|
|
|
if (! c->isVisible())
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (auto* peer = c->getPeer())
|
|
|
|
if (peer->contains (localPos + bounds.getPosition() - peer->getBounds().getPosition(), true))
|
|
|
|
auto* otherPeer = c->getPeer();
|
|
|
|
jassert (otherPeer == nullptr || dynamic_cast<LinuxComponentPeer*> (c->getPeer()) != nullptr);
|
|
|
|
|
|
|
|
if (auto* peer = static_cast<LinuxComponentPeer*> (otherPeer))
|
|
|
|
if (peer->contains (globalToLocal (*peer, localToGlobal (*this, localPos.toFloat())).roundToInt(), true))
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -474,6 +477,19 @@ private: |
|
|
|
JUCE_DECLARE_NON_COPYABLE (LinuxRepaintManager)
|
|
|
|
};
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
template <typename This>
|
|
|
|
static Point<float> localToGlobal (This& t, Point<float> relativePosition)
|
|
|
|
{
|
|
|
|
return relativePosition + t.getScreenPosition (false).toFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
template <typename This>
|
|
|
|
static Point<float> globalToLocal (This& t, Point<float> screenPosition)
|
|
|
|
{
|
|
|
|
return screenPosition - t.getScreenPosition (false).toFloat();
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
void settingChanged (const XWindowSystemUtilities::XSetting& settingThatHasChanged) override
|
|
|
|
{
|
|
|
|
|