diff --git a/tests/testgmenu.c b/tests/testgmenu.c index 1908402990..4674362fc9 100644 --- a/tests/testgmenu.c +++ b/tests/testgmenu.c @@ -921,6 +921,15 @@ button_clicked (GtkButton *button, #define BUS_NAME "org.gtk.TestMenus" #define OBJ_PATH "/org/gtk/TestMenus" +static gboolean +on_delete_event (GtkWidget *widget, + GdkEvent *event, + gpointer user_data) +{ + gtk_main_quit (); + return TRUE; +} + int main (int argc, char *argv[]) { @@ -951,6 +960,7 @@ main (int argc, char *argv[]) } window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + g_signal_connect (window, "delete-event", G_CALLBACK(on_delete_event), NULL); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6); gtk_container_add (GTK_CONTAINER (window), box);