Browse Source

Revert "Try to fix recursion of vst ui resize"

This reverts commit f119412bc9.
tags/v2.1-rc1
falkTX 5 years ago
parent
commit
cf3e3fd023
1 changed files with 6 additions and 11 deletions
  1. +6
    -11
      source/backend/plugin/CarlaPluginVST2.cpp

+ 6
- 11
source/backend/plugin/CarlaPluginVST2.cpp View File

@@ -533,7 +533,7 @@ public:
ERect* vstRect = nullptr;
dispatcher(effEditGetRect, 0, 0, &vstRect);

if (vstRect != nullptr)
if (vstRect != nullptr && !fUI.isResized)
{
const int width(vstRect->right - vstRect->left);
const int height(vstRect->bottom - vstRect->top);
@@ -541,11 +541,7 @@ public:
CARLA_SAFE_ASSERT_INT2(width > 1 && height > 1, width, height);

if (width > 1 && height > 1)
{
fUI.isBeingResized = true;
fUI.window->setSize(static_cast<uint>(width), static_cast<uint>(height), true);
fUI.isBeingResized = false;
}
}
}
else
@@ -554,6 +550,7 @@ public:
delete fUI.window;
fUI.window = nullptr;
fUI.isOpen = false;
fUI.isResized = false;
fUI.isVisible = false;

carla_stderr2("Plugin refused to open its own UI");
@@ -2089,10 +2086,8 @@ protected:
CARLA_SAFE_ASSERT_BREAK(fUI.window != nullptr);
CARLA_SAFE_ASSERT_BREAK(index > 0);
CARLA_SAFE_ASSERT_BREAK(value > 0);
CARLA_SAFE_ASSERT_BREAK(!fUI.isBeingResized);
fUI.isBeingResized = true;
fUI.isResized = true;
fUI.window->setSize(static_cast<uint>(index), static_cast<uint>(value), true);
fUI.isBeingResized = false;
ret = 1;
break;

@@ -2583,14 +2578,14 @@ private:
} fEvents;

struct UI {
bool isBeingResized;
bool isOpen;
bool isResized;
bool isVisible;
CarlaPluginUI* window;

UI() noexcept
: isBeingResized(false),
isOpen(false),
: isOpen(false),
isResized(false),
isVisible(false),
window(nullptr) {}



Loading…
Cancel
Save