13
0

Fix duplicate close-session dialog on macOS

Previously [GtkApplicationDelegate applicationShouldTerminate:]
triggered both StartupFSM::queue_finish and ArdourUI::queue_finish.
Both of which registered an idle-callback to call ArdourUI::finish.
This commit is contained in:
Robin Gareus 2023-10-09 17:19:17 +02:00
parent 120979bd76
commit c0d91362cf
2 changed files with 6 additions and 2 deletions

View File

@ -98,7 +98,7 @@ StartupFSM::StartupFSM (EngineControl& amd)
Application* app = Application::instance ();
app->ShouldQuit.connect (sigc::mem_fun (*this, &StartupFSM::queue_finish));
app_quit_connection = app->ShouldQuit.connect (sigc::mem_fun (*this, &StartupFSM::queue_finish));
Gtkmm2ext::Keyboard::HideMightMeanQuit.connect (sigc::mem_fun (*this, &StartupFSM::dialog_hidden));
}

View File

@ -85,7 +85,10 @@ class StartupFSM : public sigc::trackable
void handle_path (std::string const & path);
bool complete() const { return _state == NotWaiting; }
void set_complete () { _state = NotWaiting; }
void set_complete () {
app_quit_connection.disconnect ();
_state = NotWaiting;
}
private:
bool new_user;
@ -126,6 +129,7 @@ class StartupFSM : public sigc::trackable
PluginScanDialog* plugin_scan_dialog;
sigc::connection current_dialog_connection;
sigc::connection app_quit_connection;
sigc::signal1<void,Result> _signal_response;