summaryrefslogtreecommitdiff
path: root/libs/ardour/lv2_plugin.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-10-28 17:23:33 +0100
committerRobin Gareus <robin@gareus.org>2019-10-28 17:24:54 +0100
commite4601e54e9012da16129f543c60cf74f2621c271 (patch)
tree3e6cceb5f9405b1af47c5c167f0debf44d2cf056 /libs/ardour/lv2_plugin.cc
parent1477bca76ec65546af539ab059bab31b49990bd9 (diff)
Improve 1477bca76, ensure suil supports x11-in-gtk2
Diffstat (limited to 'libs/ardour/lv2_plugin.cc')
-rw-r--r--libs/ardour/lv2_plugin.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 6b1dbde4ca..e5de410dd4 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -855,15 +855,18 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
// Always prefer X11 UIs...
LILV_FOREACH(uis, i, uis) {
const LilvUI* ui = lilv_uis_get(uis, i);
- if (lilv_ui_is_a(ui, _world.ui_X11UI)) {
- this_ui = ui;
- this_ui_type = _world.ui_X11UI;
+ if (lilv_ui_is_a(ui, _world.ui_X11UI) &&
+ lilv_ui_is_supported (ui,
+ suil_ui_supported,
+ world.ui_GtkUI,
+ &this_ui_type)) {
+ this_ui = ui;
break;
}
}
#endif
- // then anything else...
- if (this_ui_type == NULL) {
+ // Then anything else...
+ if (this_ui == NULL) {
LILV_FOREACH(uis, i, uis) {
const LilvUI* ui = lilv_uis_get(uis, i);
if (lilv_ui_is_supported (ui,
@@ -876,7 +879,7 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
}
}
// Found one that is supported by SUIL?...
- if (this_ui_type != NULL) {
+ if (this_ui != NULL) {
_impl->ui = this_ui;
_impl->ui_type = this_ui_type;
}