diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp index 742ea537..041981d5 100644 --- a/distrho/src/DistrhoUIInternal.hpp +++ b/distrho/src/DistrhoUIInternal.hpp @@ -286,10 +286,10 @@ public: #ifdef DISTRHO_PLUGIN_TARGET_VST3 void setWindowSizeForVST3(const uint width, const uint height) { +# if DISTRHO_PLUGIN_HAS_EXTERNAL_UI ui->setSize(width, height); -# if !DISTRHO_PLUGIN_HAS_EXTERNAL_UI - // NOTE in external uis, the ui and window refer to the same object - uiData->window->setSize(width, height); +# else + uiData->window->setSizeForVST3(width, height); # endif } #endif diff --git a/distrho/src/DistrhoUIPrivateData.hpp b/distrho/src/DistrhoUIPrivateData.hpp index 378c15d4..e3e846d4 100644 --- a/distrho/src/DistrhoUIPrivateData.hpp +++ b/distrho/src/DistrhoUIPrivateData.hpp @@ -231,6 +231,13 @@ public: puglBackendEnter(pData->view); } + #ifdef DISTRHO_PLUGIN_TARGET_VST3 + void setSizeForVST3(const uint width, const uint height) + { + puglSetWindowSize(pData->view, width, height); + } + #endif + protected: void onFocus(const bool focus, const DGL_NAMESPACE::CrossingMode mode) override {