summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-30 15:54:54 +0100
committerRobin Gareus <robin@gareus.org>2015-10-30 15:55:27 +0100
commit4a3413f2d46cd948d5c11ba2010f22f55d2eb55f (patch)
tree7f45449a5b9eacc2a4240f7d47d08cec18c0184f /gtk2_ardour
parent4fa564c03b8839615753d120c127639ee7f02241 (diff)
suspend timers while flushing the gtk-event queue.
This fixes an issues where Ardour never completes to flush the GUI event queue due to rapid updates for meters and similar events. ARDOUR_UI::load_session() never returned and the complete session ran inside Gtkmm2ext::UI::flush_pending(), this later causes a crash at exit. as side effect, this also speeds up session load.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/ardour_ui.cc5
-rw-r--r--gtk2_ardour/editor.cc1
-rw-r--r--gtk2_ardour/editor_ops.cc3
3 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc
index 1291023f1b..15106d79ef 100644
--- a/gtk2_ardour/ardour_ui.cc
+++ b/gtk2_ardour/ardour_ui.cc
@@ -3204,7 +3204,10 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
fst_stop_threading();
#endif
- flush_pending ();
+ {
+ Timers::TimerSuspender t;
+ flush_pending ();
+ }
#ifdef WINDOWS_VST_SUPPORT
fst_start_threading();
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc
index c9bdb12c4e..4a559167e8 100644
--- a/gtk2_ardour/editor.cc
+++ b/gtk2_ardour/editor.cc
@@ -5074,6 +5074,7 @@ Editor::first_idle ()
MessageDialog* dialog = 0;
if (track_views.size() > 1) {
+ Timers::TimerSuspender t;
dialog = new MessageDialog (
*this,
string_compose (_("Please wait while %1 loads visual data."), PROGRAM_NAME),
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 4b00d22b28..6c48fa4e4f 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -96,6 +96,7 @@
#include "streamview.h"
#include "strip_silence_dialog.h"
#include "time_axis_view.h"
+#include "timers.h"
#include "transpose_dialog.h"
#include "transform_dialog.h"
#include "ui_config.h"
@@ -7887,6 +7888,7 @@ Editor::bring_in_callback (Gtk::Label* label, uint32_t n, uint32_t total, string
void
Editor::update_bring_in_message (Gtk::Label* label, uint32_t n, uint32_t total, string name)
{
+ Timers::TimerSuspender t;
label->set_text (string_compose ("Copying %1, %2 of %3", name, n, total));
Gtkmm2ext::UI::instance()->flush_pending ();
}
@@ -7907,6 +7909,7 @@ Editor::bring_all_sources_into_session ()
* files
*/
+ Timers::TimerSuspender t;
Gtkmm2ext::UI::instance()->flush_pending ();
cerr << " Do it\n";