diff --git a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp index 007937fa2c..a319379673 100644 --- a/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VSTPluginFormat.cpp @@ -2917,6 +2917,17 @@ public: 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOOWNERZORDER); + + MessageManager::callAsync ([ref = SafePointer (this)] + { + // Clean up after the editor window, in case it tried to move itself + // into the wrong location over this component. + if (ref == nullptr) + return; + + if (auto* p = ref->getPeer()) + p->repaint (p->getBounds().withPosition ({})); + }); } #elif JUCE_LINUX || JUCE_BSD if (pluginWindow != 0)