DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit d48c7ffc0fe7fe1d0515b9737a3af64c58acdaf1
parent 4c5b77f2e37893d9efa69599136c495d70a79083
Author: falkTX <falktx@falktx.com>
Date:   Wed, 29 Dec 2021 03:07:12 +0000

Fix vst3 host-side resize after last commits

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoUIInternal.hpp | 6+++---
Mdistrho/src/DistrhoUIPrivateData.hpp | 7+++++++
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git 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 @@ -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 {