diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 67e9a72660..8819baff64 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -2046,7 +2046,7 @@ public: { if (ComponentPeer* const peer = getPeer()) { - peer->addMaskedRegion (getScreenBounds() - peer->getScreenPosition()); + peer->addMaskedRegion (peer->globalToLocal (getScreenBounds())); #if JUCE_LINUX if (pluginWindow != 0) diff --git a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp b/modules/juce_video/native/juce_win32_DirectShowComponent.cpp index 70e27769d9..00573c2a34 100644 --- a/modules/juce_video/native/juce_win32_DirectShowComponent.cpp +++ b/modules/juce_video/native/juce_win32_DirectShowComponent.cpp @@ -802,7 +802,7 @@ void DirectShowComponent::paint (Graphics& g) context->handleUpdateNowIfNeeded(); if (ComponentPeer* const peer = getPeer()) - peer->addMaskedRegion (getScreenBounds() - peer->getScreenPosition()); + peer->addMaskedRegion (peer->globalToLocal (getScreenBounds())); } else {