diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp index 3dffcde5d8..250bec23f6 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -1161,23 +1161,21 @@ public: void resized() override { + auto newBounds = getLocalBounds(); + + #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE + if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) + return; + + lastBounds = newBounds; + #endif + if (auto* ed = getEditorComp()) { ed->setTopLeftPosition (0, 0); if (shouldResizeEditor) - { - auto newBounds = getLocalBounds(); - - #if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE - if (! lastBounds.isEmpty() && isWithin (newBounds.toDouble().getAspectRatio(), lastBounds.toDouble().getAspectRatio(), 0.1)) - return; - - lastBounds = newBounds; - #endif - ed->setBounds (ed->getLocalArea (this, newBounds)); - } updateWindowSize (false); } @@ -1188,6 +1186,11 @@ public: #endif } + void parentSizeChanged() override + { + updateWindowSize (true); + } + void childBoundsChanged (Component*) override { updateWindowSize (false); diff --git a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp index 2d8b842450..1b23b8bbbb 100644 --- a/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST3/juce_VST3_Wrapper.cpp @@ -1434,6 +1434,15 @@ private: } } + void parentSizeChanged() override + { + if (pluginEditor != nullptr) + { + resizeHostWindow(); + pluginEditor->repaint(); + } + } + void resizeHostWindow() { if (pluginEditor != nullptr) @@ -1459,7 +1468,7 @@ private: #if JUCE_MAC if (host.isWavelab() || host.isReaper()) #else - if (host.isWavelab() || host.isAbletonLive()) + if (host.isWavelab() || host.isAbletonLive() || host.isBitwigStudio()) #endif setBounds (0, 0, w, h); }