|
@@ -533,7 +533,7 @@ public: |
|
|
ERect* vstRect = nullptr; |
|
|
ERect* vstRect = nullptr; |
|
|
dispatcher(effEditGetRect, 0, 0, &vstRect); |
|
|
dispatcher(effEditGetRect, 0, 0, &vstRect); |
|
|
|
|
|
|
|
|
if (vstRect != nullptr) |
|
|
|
|
|
|
|
|
if (vstRect != nullptr && !fUI.isResized) |
|
|
{ |
|
|
{ |
|
|
const int width(vstRect->right - vstRect->left); |
|
|
const int width(vstRect->right - vstRect->left); |
|
|
const int height(vstRect->bottom - vstRect->top); |
|
|
const int height(vstRect->bottom - vstRect->top); |
|
@@ -541,11 +541,7 @@ public: |
|
|
CARLA_SAFE_ASSERT_INT2(width > 1 && height > 1, width, height); |
|
|
CARLA_SAFE_ASSERT_INT2(width > 1 && height > 1, width, height); |
|
|
|
|
|
|
|
|
if (width > 1 && height > 1) |
|
|
if (width > 1 && height > 1) |
|
|
{ |
|
|
|
|
|
fUI.isBeingResized = true; |
|
|
|
|
|
fUI.window->setSize(static_cast<uint>(width), static_cast<uint>(height), true); |
|
|
fUI.window->setSize(static_cast<uint>(width), static_cast<uint>(height), true); |
|
|
fUI.isBeingResized = false; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
@@ -554,6 +550,7 @@ public: |
|
|
delete fUI.window; |
|
|
delete fUI.window; |
|
|
fUI.window = nullptr; |
|
|
fUI.window = nullptr; |
|
|
fUI.isOpen = false; |
|
|
fUI.isOpen = false; |
|
|
|
|
|
fUI.isResized = false; |
|
|
fUI.isVisible = false; |
|
|
fUI.isVisible = false; |
|
|
|
|
|
|
|
|
carla_stderr2("Plugin refused to open its own UI"); |
|
|
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(fUI.window != nullptr); |
|
|
CARLA_SAFE_ASSERT_BREAK(index > 0); |
|
|
CARLA_SAFE_ASSERT_BREAK(index > 0); |
|
|
CARLA_SAFE_ASSERT_BREAK(value > 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.window->setSize(static_cast<uint>(index), static_cast<uint>(value), true); |
|
|
fUI.isBeingResized = false; |
|
|
|
|
|
ret = 1; |
|
|
ret = 1; |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
@@ -2583,14 +2578,14 @@ private: |
|
|
} fEvents; |
|
|
} fEvents; |
|
|
|
|
|
|
|
|
struct UI { |
|
|
struct UI { |
|
|
bool isBeingResized; |
|
|
|
|
|
bool isOpen; |
|
|
bool isOpen; |
|
|
|
|
|
bool isResized; |
|
|
bool isVisible; |
|
|
bool isVisible; |
|
|
CarlaPluginUI* window; |
|
|
CarlaPluginUI* window; |
|
|
|
|
|
|
|
|
UI() noexcept |
|
|
UI() noexcept |
|
|
: isBeingResized(false), |
|
|
|
|
|
isOpen(false), |
|
|
|
|
|
|
|
|
: isOpen(false), |
|
|
|
|
|
isResized(false), |
|
|
isVisible(false), |
|
|
isVisible(false), |
|
|
window(nullptr) {} |
|
|
window(nullptr) {} |
|
|
|
|
|
|
|
|