commit 7ce973b0cc9ad15188f6549b0ee36e3c8465845d
parent 9bbb68604fc311852515f5bbf196136c5410b005
Author: falkTX <falktx@falktx.com>
Date: Sat, 10 Feb 2024 13:56:05 +0100
Fix invalid initial size for VST3 and CLAP X11 UIs
Signed-off-by: falkTX <falktx@falktx.com>
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dgl/src/pugl.cpp b/dgl/src/pugl.cpp
@@ -353,7 +353,7 @@ PuglStatus puglSetSizeAndDefault(PuglView* view, uint width, uint height)
#ifdef DGL_USING_X11
// workaround issues in fluxbox, see https://github.com/lv2/pugl/issues/118
- if (view->impl->win)
+ if (view->impl->win && !view->parent)
{
view->sizeHints[PUGL_DEFAULT_SIZE].width = view->sizeHints[PUGL_DEFAULT_SIZE].height = 0;
}
diff --git a/distrho/src/DistrhoUIVST3.cpp b/distrho/src/DistrhoUIVST3.cpp
@@ -889,6 +889,7 @@ private:
{
DISTRHO_SAFE_ASSERT_RETURN(fView != nullptr,);
DISTRHO_SAFE_ASSERT_RETURN(fFrame != nullptr,);
+ DISTRHO_SAFE_ASSERT_RETURN(width != 0 && height != 0,);
#ifdef DISTRHO_OS_MAC
const double scaleFactor = fUI.getScaleFactor();