summaryrefslogtreecommitdiff
path: root/gtk2_ardour/port_matrix.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-09-06 21:06:10 +0000
committerCarl Hetherington <carl@carlh.net>2010-09-06 21:06:10 +0000
commitb25da08b468267771c83064c1cca8ebf5491e761 (patch)
tree6c539fd5407f78a8d289746544a1021f5727e952 /gtk2_ardour/port_matrix.cc
parentbac638935e82dc97d403fd66ad98e26e22ca7a56 (diff)
Another hacky fix for deadlocks when updating the port matrix.
git-svn-id: svn://localhost/ardour2/branches/3.0@7747 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/port_matrix.cc')
-rw-r--r--gtk2_ardour/port_matrix.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index 1c89a36af7..113a11c116 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -154,7 +154,7 @@ PortMatrix::init ()
_session->engine().PortRegisteredOrUnregistered.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context());
/* watch for route order keys changing, which changes the order of things in our global ports list(s) */
- _session->RouteOrderKeyChanged.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context());
+ _session->RouteOrderKeyChanged.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports_proxy, this), gui_context());
/* Part 3: other stuff */
@@ -576,6 +576,16 @@ PortMatrix::setup_global_ports ()
}
void
+PortMatrix::setup_global_ports_proxy ()
+{
+ /* Avoid a deadlock by calling this in an idle handler: see IOSelector::io_changed_proxy
+ for a discussion.
+ */
+
+ Glib::signal_idle().connect_once (sigc::mem_fun (*this, &PortMatrix::setup_global_ports));
+}
+
+void
PortMatrix::setup_all_ports ()
{
if (_session->deletion_in_progress()) {