diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 63941b4593..67e9a72660 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -2619,7 +2619,7 @@ private: { if (ComponentPeer* const peer = getPeer()) { - const Point pos (getScreenPosition() - peer->getScreenPosition()); + const Point pos (peer->globalToLocal (getScreenPosition())); ERect r; r.left = (VstInt16) pos.getX(); r.top = (VstInt16) pos.getY();