mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 08:36:32 +01:00
LV2 external UI handling - revert to <= 3.3. behaviour
Don't ever clean up external UI plugins that use the LV2plug.in URI. only free the memory of the last instance when the plugin is removed or ardour closes.
This commit is contained in:
parent
66292718a1
commit
c05ad01b2d
1 changed files with 10 additions and 2 deletions
|
|
@ -115,8 +115,8 @@ LV2PluginUI::on_external_ui_closed(void* controller)
|
|||
{
|
||||
//printf("LV2PluginUI::on_external_ui_closed\n");
|
||||
LV2PluginUI* me = (LV2PluginUI*)controller;
|
||||
me->_screen_update_connection.disconnect();
|
||||
if (me->_lv2->is_external_kx() /* called from plugin's UI_RUN() */) {
|
||||
me->_screen_update_connection.disconnect();
|
||||
// plugin is free()d in parent function - LV2PluginUI::output_update()
|
||||
me->_external_ui_ptr = NULL;
|
||||
}
|
||||
|
|
@ -374,7 +374,14 @@ LV2PluginUI::~LV2PluginUI ()
|
|||
delete[] _values;
|
||||
}
|
||||
|
||||
on_window_hide();
|
||||
_message_update_connection.disconnect();
|
||||
_screen_update_connection.disconnect();
|
||||
|
||||
if (_external_ui_ptr && _lv2->is_external_kx()) {
|
||||
LV2_EXTERNAL_UI_HIDE(_external_ui_ptr);
|
||||
}
|
||||
lv2ui_free();
|
||||
_external_ui_ptr = NULL;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -478,6 +485,7 @@ LV2PluginUI::on_window_hide()
|
|||
|
||||
if (_lv2->is_external_ui()) {
|
||||
if (!_external_ui_ptr) { return; }
|
||||
if (!_lv2->is_external_kx()) { return ; }
|
||||
_screen_update_connection.disconnect();
|
||||
LV2_EXTERNAL_UI_HIDE(_external_ui_ptr);
|
||||
_external_ui_ptr = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue