I think I tracked it down to what I think is the problem:
Line 572 from vst3editor.cpp (vstgui/vst3editor.cpp at 098cf0345014e35d53f3c8922f9f8d96f0f51354 · steinbergmedia/vstgui · GitHub)
which is being called from getFrame ()->setSize (width, height); (line 1522 => vstgui/vst3editor.cpp at 098cf0345014e35d53f3c8922f9f8d96f0f51354 · steinbergmedia/vstgui · GitHub)
bool VST3Editor::requestResize (const CPoint& newSize)
{
if (!plugFrame)
return false;
CCoord width = newSize.x;
CCoord height = newSize.y;
double scaleFactor = getAbsScaleFactor ();
if (editingEnabled || (width >= minSize.x * scaleFactor && width <= maxSize.x * scaleFactor && height >= minSize.y * scaleFactor && height <= maxSize.y * scaleFactor))
{
Steinberg::ViewRect vr;
vr.right = static_cast<Steinberg::int32> (width);
vr.bottom = static_cast<Steinberg::int32> (height);
return plugFrame->resizeView (this, &vr) == Steinberg::kResultTrue ? true : false;
}
return false;
}
When editingEnabled is false (which I believe is the case when you don’t select “Open UIDescription Editor”) then the block is ignored (hence plugFrame->resizeView(…) is not called) and because it returns false, the cframe.cpp code is also ignored:
bool CFrame::setSize (CCoord width, CCoord height)
{
if ((width == getViewSize ().getWidth ()) && (height == getViewSize ().getHeight ()))
return false;
CRect newSize (getViewSize ());
newSize.setWidth (width);
newSize.setHeight (height);
if (getEditor ())
{
if (getEditor ()->beforeSizeChange (newSize, getViewSize ()) == false)
return false;
}
///// Yan's comment
///// The following code is ignored because getEditor ()->beforeSizeChange returns false
///// End Yan's comment
if (pImpl->platformFrame)
{
if (pImpl->platformFrame->setSize (newSize))
{
CViewContainer::setViewSize (newSize);
return true;
}
return false;
}
CViewContainer::setViewSize (newSize);
return true;
}