|
|
@@ -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) {} |
|
|
|
|
|
|
|