diff --git a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp index ba38682646..2e0bfc54f6 100644 --- a/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp +++ b/modules/juce_audio_processors/format_types/juce_VST3PluginFormat.cpp @@ -1479,6 +1479,7 @@ static std::shared_ptr getARAFactory (VST3ModuleHandle& m //============================================================================== struct VST3PluginWindow final : public AudioProcessorEditor, private ComponentMovementWatcher, + private ComponentBoundsConstrainer, private IPlugFrame { VST3PluginWindow (AudioPluginInstance* owner, IPlugView* pluginView) @@ -1492,6 +1493,7 @@ struct VST3PluginWindow final : public AudioProcessorEditor, setSize (10, 10); setOpaque (true); setVisible (true); + setConstrainer (this); warnOnFailure (view->setFrame (this)); view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface); @@ -1565,6 +1567,19 @@ struct VST3PluginWindow final : public AudioProcessorEditor, bool keyPressed (const KeyPress& /*key*/) override { return true; } private: + void checkBounds (Rectangle& bounds, + const Rectangle&, + const Rectangle&, + bool, + bool, + bool, + bool) override + { + auto rect = componentToVST3Rect (bounds); + view->checkSizeConstraint (&rect); + bounds = vst3ToComponentRect (rect); + } + //============================================================================== void componentPeerChanged() override {}