aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/jalv.c2
-rw-r--r--src/jalv_console.c7
-rw-r--r--src/jalv_gtk.c7
-rw-r--r--src/jalv_gtkmm2.cpp7
-rw-r--r--src/jalv_internal.h3
-rw-r--r--src/jalv_qt4.cpp6
6 files changed, 31 insertions, 1 deletions
diff --git a/src/jalv.c b/src/jalv.c
index caa0ece..575eca1 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -569,7 +569,7 @@ jack_session_cb(jack_session_event_t* event, void* arg)
break;
case JackSessionSaveAndQuit:
jalv_save(jalv, event->session_dir);
- zix_sem_post(&exit_sem);
+ jalv_close_ui(jalv);
break;
}
diff --git a/src/jalv_console.c b/src/jalv_console.c
index fe47ea3..905332f 100644
--- a/src/jalv_console.c
+++ b/src/jalv_console.c
@@ -108,3 +108,10 @@ jalv_open_ui(Jalv* jalv)
return 0;
}
+
+int
+jalv_close_ui(Jalv* jalv)
+{
+ zix_sem_post(jalv->done);
+ return 0;
+}
diff --git a/src/jalv_gtk.c b/src/jalv_gtk.c
index f64b8a2..25de946 100644
--- a/src/jalv_gtk.c
+++ b/src/jalv_gtk.c
@@ -641,3 +641,10 @@ jalv_open_ui(Jalv* jalv)
zix_sem_post(jalv->done);
return 0;
}
+
+int
+jalv_close_ui(Jalv* jalv)
+{
+ gtk_main_quit();
+ return 0;
+}
diff --git a/src/jalv_gtkmm2.cpp b/src/jalv_gtkmm2.cpp
index 4e31d17..8725733 100644
--- a/src/jalv_gtkmm2.cpp
+++ b/src/jalv_gtkmm2.cpp
@@ -91,3 +91,10 @@ jalv_open_ui(Jalv* jalv)
return 0;
}
+
+int
+jalv_close_ui(Jalv* jalv)
+{
+ Gtk::Main::quit();
+ return 0;
+}
diff --git a/src/jalv_internal.h b/src/jalv_internal.h
index ef421ca..df07cb2 100644
--- a/src/jalv_internal.h
+++ b/src/jalv_internal.h
@@ -198,6 +198,9 @@ jalv_native_ui_type(Jalv* jalv);
int
jalv_open_ui(Jalv* jalv);
+int
+jalv_close_ui(Jalv* jalv);
+
void
jalv_ui_instantiate(Jalv* jalv,
const char* native_ui_type,
diff --git a/src/jalv_qt4.cpp b/src/jalv_qt4.cpp
index 34ab8e4..1ba9ad0 100644
--- a/src/jalv_qt4.cpp
+++ b/src/jalv_qt4.cpp
@@ -96,4 +96,10 @@ jalv_open_ui(Jalv* jalv)
return ret;
}
+int
+jalv_close_ui(Jalv* jalv)
+{
+ app->quit();
+}
+
} // extern "C"