Exiting GTK+, allowing CLI to continue
My GUI currently never programmatically exits even though I push the X and the window disappears, so I have to exit the terminal thereby losing Valgrind's help (unless the program crashes). In the following code fragment which I thought would do this, w is the window.
Code:
g_signal_connect(G_OBJECT(w), "delete_event", G_CALLBACK(delete_event), NULL);
g_signal_connect(G_OBJECT(w), "destroy", G_CALLBACK(destroy), NULL);
And I define those callbacks thusly:
Code:
void destroy(GtkWidget *widget, gpointer data){
gtk_main_quit();
}
gint delete_event(GtkWidget *widget, GdkEvent *event, gpointer data){
return FALSE;
}
I thought that should work?
Thanks!