mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST3 Host: Ensure requested size is applied, even when plugin does not support scaling
This fixes some issues with Izotope Ozone 9: - Resizing would stutter, and could leave the view in an inconsistent state. - Closing and reopening the view after resizing would display black bars around the editor view. The root of the problem was that the call to Component::setSize() inside the resizeView call checked whether the plugin supported resizing. If not, it would force the embedded view back to the current size. This behaviour is incorrect - if the plugin requests a resize via resizeView, the new size should be applied whether or not the plugin "supports resizing".
This commit is contained in:
parent
ebf86b5f35
commit
61cdcff2e9
1 changed files with 7 additions and 0 deletions
|
|
@ -1525,6 +1525,8 @@ private:
|
|||
|
||||
tresult PLUGIN_API resizeView (IPlugView* incomingView, ViewRect* newSize) override
|
||||
{
|
||||
const ScopedValueSetter<bool> recursiveResizeSetter (recursiveResize, true);
|
||||
|
||||
if (incomingView != nullptr && newSize != nullptr && incomingView == view)
|
||||
{
|
||||
auto scaleToViewRect = [this] (int dimension)
|
||||
|
|
@ -1536,6 +1538,11 @@ private:
|
|||
auto oldHeight = scaleToViewRect (getHeight());
|
||||
|
||||
resizeWithRect (embeddedComponent, *newSize, nativeScaleFactor);
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
setPluginWindowPos (*newSize);
|
||||
#endif
|
||||
|
||||
setSize (embeddedComponent.getWidth(), embeddedComponent.getHeight());
|
||||
|
||||
// According to the VST3 Workflow Diagrams, a resizeView from the plugin should
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue