Browse Source

Stop trying to map plugin UIs if they are closed too quickly

tags/1.9.6
falkTX 10 years ago
parent
commit
c7f41fca71
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      source/backend/plugin/CarlaPluginLV2.cpp

+ 8
- 4
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -1477,12 +1477,12 @@ public:
case CarlaPipeServerLV2::UiNone:
case CarlaPipeServerLV2::UiShow:
break;
case CarlaPipeServerLV2::UiCrashed:
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
break;
case CarlaPipeServerLV2::UiHide:
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
fPipeServer.stopPipeServer(2000);
// nobreak
case CarlaPipeServerLV2::UiCrashed:
pData->transientTryCounter = 0;
pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr);
break;
}
}
@@ -4422,6 +4422,8 @@ public:
CARLA_SAFE_ASSERT_RETURN(fUI.type == UI::TYPE_EXTERNAL,);
carla_debug("CarlaPluginLV2::handleExternalUIClosed()");

pData->transientTryCounter = 0;

if (fUI.handle != nullptr && fUI.descriptor != nullptr && fUI.descriptor->cleanup != nullptr)
fUI.descriptor->cleanup(fUI.handle);

@@ -4436,6 +4438,8 @@ public:
CARLA_SAFE_ASSERT_RETURN(fUI.window != nullptr,);
carla_debug("CarlaPluginLV2::handlePluginUIClosed()");

pData->transientTryCounter = 0;

fUI.window->hide();

if (fUI.handle != nullptr && fUI.descriptor != nullptr && fUI.descriptor->cleanup != nullptr)


Loading…
Cancel
Save