Implement preference to destroy plugin UIs
see also https://discourse.ardour.org/t/very-high-gpu-usage-on-windows/107672
This commit is contained in:
parent
830fe4da2f
commit
e635571f2f
@ -4674,6 +4674,27 @@ ProcessorWindowProxy::ProcessorWindowProxy (string const & name, ProcessorBox* b
|
||||
p->ToggleUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::show_the_right_window, this, false), gui_context());
|
||||
p->ShowUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::show_the_right_window, this, true), gui_context());
|
||||
p->HideUI.connect (gui_connections, invalidator (*this), boost::bind (&ProcessorWindowProxy::hide, this), gui_context());
|
||||
|
||||
boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (p);
|
||||
if (pi) {
|
||||
signal_unmap.connect (sigc::bind ([] (ProxyBase* self, PluginType type) {
|
||||
ProcessorWindowProxy* me = dynamic_cast<ProcessorWindowProxy*> (self);
|
||||
if (!me->is_custom) {
|
||||
return;
|
||||
}
|
||||
switch (UIConfiguration::instance ().get_plugin_gui_behavior ()) {
|
||||
case PluginGUIHide:
|
||||
return;
|
||||
case PluginGUIDestroyVST:
|
||||
if (type != Windows_VST && type != LXVST && type != MacVST && type != VST3) {
|
||||
return;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Glib::signal_idle ().connect (sigc::bind ([] (ProxyBase* s) { s->drop_window (); return false; }, self));
|
||||
}, this, pi->type ()));
|
||||
}
|
||||
}
|
||||
|
||||
ProcessorWindowProxy::~ProcessorWindowProxy()
|
||||
|
@ -111,6 +111,7 @@ UI_CONFIG_VARIABLE (int32_t, recent_session_sort, "recent-session-sort", 0)
|
||||
UI_CONFIG_VARIABLE (bool, save_export_analysis_image, "save-export-analysis-image", false)
|
||||
UI_CONFIG_VARIABLE (bool, save_export_mixer_screenshot, "save-export-mixer-screenshot", false)
|
||||
UI_CONFIG_VARIABLE (bool, open_gui_after_adding_plugin, "open-gui-after-adding-plugin", true)
|
||||
UI_CONFIG_VARIABLE (ARDOUR::PluginGUIBehavior, plugin_gui_behavior, "plugin-gui-behavior", PluginGUIHide)
|
||||
UI_CONFIG_VARIABLE (bool, show_inline_display_by_default, "show-inline-display-by-default", true)
|
||||
UI_CONFIG_VARIABLE (int32_t, max_plugin_chart, "max-plugin-chart", 10)
|
||||
UI_CONFIG_VARIABLE (int32_t, max_plugin_recent, "max-plugin-recent", 10)
|
||||
|
Loading…
Reference in New Issue
Block a user