summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/application.c9
-rw-r--r--src/application.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/src/application.c b/src/application.c
index b46f58f..1727ad3 100644
--- a/src/application.c
+++ b/src/application.c
@@ -61,3 +61,12 @@ mq_application_add_window(MqApplication *application, gchar **uris)
return window;
}
+
+void
+mq_application_delete_window(GtkWidget __attribute__((unused)) *window,
+ MqApplication *application)
+{
+ if (--application->window_count == 0) {
+ gtk_main_quit();
+ }
+}
diff --git a/src/application.h b/src/application.h
index e3303c7..4c56c43 100644
--- a/src/application.h
+++ b/src/application.h
@@ -39,4 +39,7 @@ mq_application_main(MqApplication *application);
MqWindow *
mq_application_add_window(MqApplication *application, gchar **uris);
+void
+mq_application_delete_window(GtkWidget *window, MqApplication *application);
+
#endif