From 0d35a79c112c36cd5d8794da7fa238954f3edd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Tue, 9 Jul 2024 13:06:57 -0400 Subject: [PATCH] [vst/vst3] Disable GUI when running under wayland as plug-ins will crash --- src/plugins/score-plugin-vst/Vst/EffectModel.cpp | 7 +++++++ src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/src/plugins/score-plugin-vst/Vst/EffectModel.cpp b/src/plugins/score-plugin-vst/Vst/EffectModel.cpp index a1525a2cd0..587e99a9de 100644 --- a/src/plugins/score-plugin-vst/Vst/EffectModel.cpp +++ b/src/plugins/score-plugin-vst/Vst/EffectModel.cpp @@ -175,6 +175,13 @@ bool Model::hasExternalUI() const noexcept { if(!fx) return false; + +#if defined(__linux__) + static const thread_local bool is_wayland = qApp->platformName() == "wayland"; + if(is_wayland) + return false; +#endif + return bool(fx->fx->flags & VstAEffectFlags::effFlagsHasEditor); } diff --git a/src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp b/src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp index 077b1d31aa..c3b961d3f6 100644 --- a/src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp +++ b/src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp @@ -135,6 +135,12 @@ QString Model::prettyName() const noexcept bool Model::hasExternalUI() const noexcept { +#if defined(__linux__) + static const thread_local bool is_wayland = qApp->platformName() == "wayland"; + if(is_wayland) + return false; +#endif + return fx.hasUI; }