From f7cb1b0b481eeda755bdf8eb9fc5f90a81d2aa01 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 14 Nov 2020 02:49:24 +0100 Subject: [PATCH] LXVST2: only call effEditIdle after realizing the GUI This fixes an issue with some plugin-wrappers, notably https://github.com/robbert-vdh/yabridge/commit/ff021d05812766b69fccd53ec8c40eb38ea054a6 --- gtk2_ardour/linux_vst_gui_support.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/linux_vst_gui_support.cc b/gtk2_ardour/linux_vst_gui_support.cc index 4d4de55e24..b577d45194 100644 --- a/gtk2_ardour/linux_vst_gui_support.cc +++ b/gtk2_ardour/linux_vst_gui_support.cc @@ -446,7 +446,12 @@ again: /*Call the editor Idle function in the plugin*/ - vstfx->plugin->dispatcher (vstfx->plugin, effEditIdle, 0, 0, NULL, 0); + if(vstfx->been_activated) { + /* some plugins have issues if effEditIdle is called w/o an editor. + * This may happen due to async X11 requests, delaying the call to effEditOpen. + */ + vstfx->plugin->dispatcher (vstfx->plugin, effEditIdle, 0, 0, NULL, 0); + } if (vstfx->wantIdle) { vstfx->plugin->dispatcher (vstfx->plugin, 53, 0, 0, NULL, 0);