diff --git a/source/native-plugins/audio-file.cpp b/source/native-plugins/audio-file.cpp index 70451a656..584acda27 100644 --- a/source/native-plugins/audio-file.cpp +++ b/source/native-plugins/audio-file.cpp @@ -259,22 +259,6 @@ protected: #endif } - // ------------------------------------------------------------------- - // Plugin dispatcher calls - - void idle() override - { - NativePluginWithMidiPrograms::idle(); - -#ifndef __MOD_DEVICES__ - if (fInlineDisplay.pending == InlineDisplayNeedRequest) - { - fInlineDisplay.pending = InlineDisplayRequesting; - hostQueueDrawInlineDisplay(); - } -#endif - } - // ------------------------------------------------------------------- // Plugin UI calls @@ -300,6 +284,19 @@ protected: // ------------------------------------------------------------------- // Plugin dispatcher calls + void idle() override + { + NativePluginWithMidiPrograms::idle(); + +#ifndef __MOD_DEVICES__ + if (fInlineDisplay.pending == InlineDisplayNeedRequest) + { + fInlineDisplay.pending = InlineDisplayRequesting; + hostQueueDrawInlineDisplay(); + } +#endif + } + #ifndef __MOD_DEVICES__ const NativeInlineDisplayImageSurface* renderInlineDisplay(const uint32_t rwidth, const uint32_t height) override { diff --git a/source/native-plugins/bigmeter.cpp b/source/native-plugins/bigmeter.cpp index 51144bbd7..4f92984c8 100644 --- a/source/native-plugins/bigmeter.cpp +++ b/source/native-plugins/bigmeter.cpp @@ -175,16 +175,25 @@ protected: needsInlineRender = true; } - if (needsInlineRender && fInlineDisplay.pending != 1) + if (needsInlineRender && fInlineDisplay.pending != 1 && fInlineDisplay.pending != 2) { fInlineDisplay.pending = 1; - hostQueueDrawInlineDisplay(); + hostRequestIdle(); } } // ------------------------------------------------------------------- // Plugin dispatcher calls + void idle() override + { + if (fInlineDisplay.pending == 1) + { + fInlineDisplay.pending = 2; + hostQueueDrawInlineDisplay(); + } + } + const NativeInlineDisplayImageSurface* renderInlineDisplay(const uint32_t rwidth, const uint32_t height) override { CARLA_SAFE_ASSERT_RETURN(rwidth > 0 && height > 0, nullptr); @@ -324,7 +333,8 @@ static const NativePluginDescriptor bigmeterDesc = { /* category */ NATIVE_PLUGIN_CATEGORY_UTILITY, /* hints */ static_cast(NATIVE_PLUGIN_IS_RTSAFE |NATIVE_PLUGIN_HAS_INLINE_DISPLAY - |NATIVE_PLUGIN_HAS_UI), + |NATIVE_PLUGIN_HAS_UI + |NATIVE_PLUGIN_REQUESTS_IDLE), /* supports */ NATIVE_PLUGIN_SUPPORTS_NOTHING, /* audioIns */ 2, /* audioOuts */ 0,