From: Tomas Mudrunka Date: Thu, 19 Apr 2012 14:01:52 +0000 (+0200) Subject: Fixed gtk signal handling X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=aa9f75db20711aa36e1bdb67e3dae9e825542fcd;p=mirrors%2FPrograms.git Fixed gtk signal handling --- diff --git a/c/vizionix/mkxsock.c b/c/vizionix/mkxsock.c index afc9beb..74cb99b 100644 --- a/c/vizionix/mkxsock.c +++ b/c/vizionix/mkxsock.c @@ -3,6 +3,8 @@ #include #include +int return_true(void) { return 1; } + void print_help(char ** argv) { printf( "Usage: %s [args]\n" @@ -51,7 +53,7 @@ gint main(gint argc, gchar ** argv) //Create window GtkWidget *win = gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget *sock = gtk_socket_new(); - g_signal_connect(sock, "plug-removed", gtk_main_quit, NULL); + g_signal_connect(sock, "plug-removed", G_CALLBACK(return_true), NULL); g_signal_connect(win, "delete-event", gtk_main_quit, NULL); gtk_widget_set_size_request(sock, width, height); gtk_widget_modify_bg(sock, GTK_STATE_NORMAL, &color);