DPF

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

commit f8193925692165f345082b850a77d83c241407d6
parent 5618819a3c5d2f932b4d8b1d0422c1bd4b9d35ee
Author: falkTX <falktx@falktx.com>
Date:   Mon, 13 Sep 2021 12:10:22 +0100

Move setIgnoreIdleCallbacks to a proper place, before UI creation

Diffstat:
Mdistrho/src/DistrhoUI.cpp | 5+++++
Mdistrho/src/DistrhoUIInternal.hpp | 4----
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp @@ -152,6 +152,11 @@ UI::PrivateData::createNextWindow(UI* const ui, const uint width, const uint hei return ewData; #else pData->window = new PluginWindow(ui, pData->app, pData->winId, width, height, pData->scaleFactor); + + // If there are no callbacks, this is most likely a temporary window, so ignore idle callbacks + if (pData->callbacksPtr == nullptr) + pData->window->setIgnoreIdleCallbacks(); + return pData->window.getObject(); #endif } diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp @@ -93,10 +93,6 @@ public: #else // Leave context called in the PluginWindow constructor, see DistrhoUIPrivateData.hpp uiData->window->leaveContext(); - - // If there are no callbacks, this is most likely a temporary window, so ignore idle callbacks - if (callbacksPtr == nullptr) - uiData->window->setIgnoreIdleCallbacks(); #endif UI::PrivateData::s_nextPrivateData = nullptr;