diff --git a/source/backend/engine/CarlaEngineNative.cpp b/source/backend/engine/CarlaEngineNative.cpp index 8ac9f610d..fd44a38f7 100644 --- a/source/backend/engine/CarlaEngineNative.cpp +++ b/source/backend/engine/CarlaEngineNative.cpp @@ -1509,6 +1509,22 @@ protected: else { fUiServer.stopPipeServer(5000); + + // hide all custom uis + for (uint i=0; i < pData->curPluginCount; ++i) + { + CarlaPlugin* const plugin(pData->plugins[i].plugin); + + if (plugin != nullptr && plugin->isEnabled()) + { + if (plugin->getHints() & PLUGIN_HAS_CUSTOM_UI) + { + try { + plugin->showCustomUI(false); + } CARLA_SAFE_EXCEPTION_CONTINUE("Plugin showCustomUI (hide)"); + } + } + } } } diff --git a/source/carla_host.py b/source/carla_host.py index a4a2de2b5..908b28c3a 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -1788,13 +1788,13 @@ class HostWindow(QMainWindow): QMainWindow.showEvent(self, event) # set our gui as parent for all plugins UIs - if self.fParentOrSelf == self: + if not self.host.isPlugin: winIdStr = "%x" % self.winId() self.host.set_engine_option(ENGINE_OPTION_FRONTEND_WIN_ID, 0, winIdStr) def hideEvent(self, event): # disable parent - if self.fParentOrSelf == self: + if not self.host.isPlugin: self.host.set_engine_option(ENGINE_OPTION_FRONTEND_WIN_ID, 0, "0") QMainWindow.hideEvent(self, event)