Use mutual recursion for IEditController::setState

With this we should be able to handle `setState()`s that try to resize
the currently open editor. This could pop up when using the preset
browser in REAPER with plugins that recall their old size when loading a
preset.
This commit is contained in:
Robbert van der Helm
2021-04-30 01:15:18 +02:00
parent 0536256217
commit 949ddaf673
5 changed files with 50 additions and 15 deletions
@@ -354,6 +354,12 @@ class Vst3PluginProxyImpl : public Vst3PluginProxy {
*/
Vst3PlugViewProxyImpl* last_created_plug_view = nullptr;
/**
* Whether `last_created_plug_view` is currently active. This field is
* written to from `Vst3PlugViewProxyImpl`'s constructor and destructor.
*/
std::atomic_bool last_created_plug_view_active = false;
/**
* A pointer to a context menu returned by the host as a response to a call
* to `IComponentHandler3::createContextMenu`, as well as all targets we've