Browse Source

Hide custom UIs when closing carla-plugin

tags/1.9.6
falkTX 9 years ago
parent
commit
6501bf3f2f
2 changed files with 18 additions and 2 deletions
  1. +16
    -0
      source/backend/engine/CarlaEngineNative.cpp
  2. +2
    -2
      source/carla_host.py

+ 16
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -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)");
}
}
}
}
}



+ 2
- 2
source/carla_host.py View File

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


Loading…
Cancel
Save