diff --git a/source/backend/plugin/CarlaPlugin.cpp b/source/backend/plugin/CarlaPlugin.cpp index fc5e24bea..6f5f95069 100644 --- a/source/backend/plugin/CarlaPlugin.cpp +++ b/source/backend/plugin/CarlaPlugin.cpp @@ -2198,6 +2198,7 @@ void CarlaPlugin::uiIdle() pData->postUiEvents.data.clear(); } +#ifndef BUILD_BRIDGE if (pData->transientTryCounter == 0) return; if (++pData->transientTryCounter % 10 != 0) @@ -2216,6 +2217,7 @@ void CarlaPlugin::uiIdle() pData->transientTryCounter = 0; pData->transientFirstTry = false; } +#endif } void CarlaPlugin::uiParameterChange(const uint32_t index, const float value) noexcept diff --git a/source/backend/plugin/CarlaPluginBridge.cpp b/source/backend/plugin/CarlaPluginBridge.cpp index 7e3e5ba25..3f2e2778e 100644 --- a/source/backend/plugin/CarlaPluginBridge.cpp +++ b/source/backend/plugin/CarlaPluginBridge.cpp @@ -1,6 +1,6 @@ /* * Carla Plugin Bridge - * Copyright (C) 2011-2017 Filipe Coelho + * Copyright (C) 2011-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -391,9 +391,11 @@ public: { carla_debug("CarlaPluginBridge::~CarlaPluginBridge()"); +#ifndef BUILD_BRIDGE // close UI if (pData->hints & PLUGIN_HAS_CUSTOM_UI) pData->transientTryCounter = 0; +#endif pData->singleMutex.lock(); pData->masterMutex.lock(); @@ -2175,7 +2177,9 @@ public: break; case kPluginBridgeNonRtServerUiClosed: +#ifndef BUILD_BRIDGE pData->transientTryCounter = 0; +#endif pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); break; diff --git a/source/backend/plugin/CarlaPluginDSSI.cpp b/source/backend/plugin/CarlaPluginDSSI.cpp index 1b9e567bc..a42de9b64 100644 --- a/source/backend/plugin/CarlaPluginDSSI.cpp +++ b/source/backend/plugin/CarlaPluginDSSI.cpp @@ -1,6 +1,6 @@ /* * Carla Plugin, DSSI implementation - * Copyright (C) 2011-2017 Filipe Coelho + * Copyright (C) 2011-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -669,7 +669,9 @@ public: } else { +#ifndef BUILD_BRIDGE pData->transientTryCounter = 0; +#endif if (fOscData.target != nullptr) { @@ -2333,8 +2335,10 @@ public: for (uint32_t i=0; i < pData->param.count; ++i) osc_send_control(fOscData, pData->param.data[i].rindex, getParameterValue(i)); +#ifndef BUILD_BRIDGE if (pData->engine->getOptions().frontendWinId != 0) pData->transientTryCounter = 1; +#endif carla_stdout("CarlaPluginDSSI::updateOscData() - done"); } diff --git a/source/backend/plugin/CarlaPluginInternal.cpp b/source/backend/plugin/CarlaPluginInternal.cpp index f04eff34d..a8d8226bd 100644 --- a/source/backend/plugin/CarlaPluginInternal.cpp +++ b/source/backend/plugin/CarlaPluginInternal.cpp @@ -1,6 +1,6 @@ /* * Carla Plugin - * Copyright (C) 2011-2014 Filipe Coelho + * Copyright (C) 2011-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -591,8 +591,10 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx uiLib(nullptr), ctrlChannel(0), extraHints(0x0), +#ifndef BUILD_BRIDGE transientTryCounter(0), transientFirstTry(true), +#endif name(nullptr), filename(nullptr), iconName(nullptr), @@ -620,7 +622,9 @@ CarlaPlugin::ProtectedData::ProtectedData(CarlaEngine* const eng, const uint idx CarlaPlugin::ProtectedData::~ProtectedData() noexcept { CARLA_SAFE_ASSERT(! (active && needsReset)); +#ifndef BUILD_BRIDGE CARLA_SAFE_ASSERT(transientTryCounter == 0); +#endif { // mutex MUST have been locked before diff --git a/source/backend/plugin/CarlaPluginInternal.hpp b/source/backend/plugin/CarlaPluginInternal.hpp index 840c0f64e..f1510b392 100644 --- a/source/backend/plugin/CarlaPluginInternal.hpp +++ b/source/backend/plugin/CarlaPluginInternal.hpp @@ -1,6 +1,6 @@ /* * Carla Plugin - * Copyright (C) 2011-2014 Filipe Coelho + * Copyright (C) 2011-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -227,8 +227,10 @@ struct CarlaPlugin::ProtectedData { // misc int8_t ctrlChannel; uint extraHints; +#ifndef BUILD_BRIDGE uint transientTryCounter; bool transientFirstTry; +#endif // data 1 const char* name; diff --git a/source/backend/plugin/CarlaPluginLV2.cpp b/source/backend/plugin/CarlaPluginLV2.cpp index a3d9b42bb..2bf33f441 100644 --- a/source/backend/plugin/CarlaPluginLV2.cpp +++ b/source/backend/plugin/CarlaPluginLV2.cpp @@ -1284,8 +1284,10 @@ public: const uintptr_t frontendWinId(pData->engine->getOptions().frontendWinId); +#ifndef BUILD_BRIDGE if (! yesNo) pData->transientTryCounter = 0; +#endif if (fUI.type == UI::TYPE_BRIDGE) { @@ -1575,7 +1577,9 @@ public: fPipeServer.stopPipeServer(2000); // fall through case CarlaPipeServerLV2::UiCrashed: +#ifndef BUILD_BRIDGE pData->transientTryCounter = 0; +#endif pData->engine->callback(ENGINE_CALLBACK_UI_STATE_CHANGED, pData->id, 0, 0, 0.0f, nullptr); break; } diff --git a/source/backend/plugin/CarlaPluginNative.cpp b/source/backend/plugin/CarlaPluginNative.cpp index 712711d62..d9b93b127 100644 --- a/source/backend/plugin/CarlaPluginNative.cpp +++ b/source/backend/plugin/CarlaPluginNative.cpp @@ -1,6 +1,6 @@ /* * Carla Native Plugin - * Copyright (C) 2012-2017 Filipe Coelho + * Copyright (C) 2012-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -229,7 +229,9 @@ public: if (fIsUiVisible && fDescriptor != nullptr && fDescriptor->ui_show != nullptr && fHandle != nullptr) fDescriptor->ui_show(fHandle, false); +#ifndef BUILD_BRIDGE pData->transientTryCounter = 0; +#endif } pData->singleMutex.lock(); @@ -751,7 +753,9 @@ public: if (! yesNo) { +#ifndef BUILD_BRIDGE pData->transientTryCounter = 0; +#endif return; } diff --git a/source/utils/CarlaPluginUI.cpp b/source/utils/CarlaPluginUI.cpp index f529d9261..8dffcdaa4 100644 --- a/source/utils/CarlaPluginUI.cpp +++ b/source/utils/CarlaPluginUI.cpp @@ -853,6 +853,7 @@ LRESULT CALLBACK wndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) // ----------------------------------------------------- +#ifndef BUILD_BRIDGE bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI) { CARLA_SAFE_ASSERT_RETURN(uiTitle != nullptr && uiTitle[0] != '\0', true); @@ -1140,6 +1141,7 @@ bool CarlaPluginUI::tryTransientWinIdMatch(const uintptr_t pid, const char* cons return true; (void)pid; (void)centerUI; } +#endif // BUILD_BRIDGE // ----------------------------------------------------- diff --git a/source/utils/CarlaPluginUI.hpp b/source/utils/CarlaPluginUI.hpp index 19996aeb3..32d794899 100644 --- a/source/utils/CarlaPluginUI.hpp +++ b/source/utils/CarlaPluginUI.hpp @@ -1,6 +1,6 @@ /* * Carla Plugin UI - * Copyright (C) 2014 Filipe Coelho + * Copyright (C) 2014-2018 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -46,7 +46,9 @@ public: virtual void* getDisplay() const noexcept = 0; #endif +#ifndef BUILD_BRIDGE static bool tryTransientWinIdMatch(const uintptr_t pid, const char* const uiTitle, const uintptr_t winId, const bool centerUI); +#endif #ifdef CARLA_OS_MAC static CarlaPluginUI* newCocoa(Callback*, uintptr_t, bool);