Skip to content

Commit

Permalink
VST: Ensure that reported bounds are consistent on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ed95 committed Mar 18, 2019
1 parent 9a6b37d commit 150d9ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Expand Up @@ -1126,10 +1126,6 @@ struct VST3PluginWindow : public AudioProcessorEditor,

warnOnFailure (view->setFrame (this));

#if JUCE_MAC
resizeToFit();
#endif

Steinberg::IPlugViewContentScaleSupport* scaleInterface = nullptr;
view->queryInterface (Steinberg::IPlugViewContentScaleSupport::iid, (void**) &scaleInterface);

Expand All @@ -1138,6 +1134,8 @@ struct VST3PluginWindow : public AudioProcessorEditor,
pluginRespondsToDPIChanges = true;
scaleInterface->release();
}

resizeToFit();
}

~VST3PluginWindow() override
Expand Down
Expand Up @@ -2776,7 +2776,10 @@ struct VSTPluginWindow : public AudioProcessorEditor,

activeVSTWindows.add (this);

setSize (1, 1);
Vst2::ERect* rect = nullptr;
dispatch (Vst2::effEditGetRect, 0, 0, &rect, 0);
setSize (rect->right - rect->left, rect->bottom - rect->top);

setOpaque (true);
setVisible (true);
}
Expand Down

0 comments on commit 150d9ea

Please sign in to comment.