X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fgtkmm2ext%2Fgtk_ui.cc;h=33841cd0beb6821c61a5927c2a848437e1eeb2f7;hb=944c32346b3c6bb87fccb22f159bdd9297bae50d;hp=831fa7e38f1ecef54633c23d6778482c6de4aecc;hpb=c98fcb62fb7daf5f52098dfe5ad4e68e71ddfe70;p=ardour.git diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 831fa7e38f..33841cd0be 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -43,6 +43,7 @@ #include "gtkmm2ext/actions.h" #include "gtkmm2ext/activatable.h" #include "gtkmm2ext/actions.h" +#include "gtkmm2ext/gui_thread.h" #include "i18n.h" @@ -120,9 +121,9 @@ UI::UI (string namestr, int *argc, char ***argv) UI::~UI () { + _receiver.hangup (); } - bool UI::caller_is_ui_thread () { @@ -265,12 +266,14 @@ UI::run (Receiver &old_receiver) Glib::signal_idle().connect (bind_return (mem_fun (old_receiver, &Receiver::hangup), false)); - starting (); + if (starting ()) { + return; + } + _active = true; theMain->run (); _active = false; - stopping (); - _receiver.hangup (); + return; } @@ -689,7 +692,7 @@ UI::flush_pending () } bool -UI::just_hide_it (GdkEventAny */*ev*/, Window *win) +UI::just_hide_it (GdkEventAny* /*ev*/, Window *win) { win->hide (); return true; @@ -739,7 +742,7 @@ UI::color_selection_done (bool status) } bool -UI::color_selection_deleted (GdkEventAny */*ev*/) +UI::color_selection_deleted (GdkEventAny* /*ev*/) { Main::quit (); return true;