From d48c7ffc0fe7fe1d0515b9737a3af64c58acdaf1 Mon Sep 17 00:00:00 2001 From: falkTX Date: Wed, 29 Dec 2021 03:07:39 +0000 Subject: [PATCH] Fix vst3 host-side resize after last commits Signed-off-by: falkTX --- distrho/src/DistrhoUIInternal.hpp | 6 +++--- distrho/src/DistrhoUIPrivateData.hpp | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) 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 {