Skip to content

Commit

Permalink
[vst/vst3] Disable GUI when running under wayland as plug-ins will crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jul 9, 2024
1 parent e0676c9 commit 0d35a79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugins/score-plugin-vst/Vst/EffectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
6 changes: 6 additions & 0 deletions src/plugins/score-plugin-vst3/Vst3/EffectModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0d35a79

Please sign in to comment.