diff options
author | Dan Nicholson <dbn.lists@gmail.com> | 2013-02-23 21:04:43 -0800 |
---|---|---|
committer | Dan Nicholson <dbn.lists@gmail.com> | 2013-02-23 21:57:31 -0800 |
commit | 95fb67d69f4638a97ed69f01fc758c7d2a48b2dd (patch) | |
tree | d8de756459d7c47d6bb3651877f9f1e9763273d5 | |
parent | 6db21f6a3443da8f2296b9b91d5717176bc42006 (diff) |
previewer: Quit the separate plug process when the widget is destroyed
Until now, the forked plug process was hanging around in the main loop
because nothing was forcing it to quit. Watch for the plug widget to be
destroyed and quit the main loop to exit.
-rw-r--r-- | test/previewer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/previewer.c b/test/previewer.c index ea81040..ff8143b 100644 --- a/test/previewer.c +++ b/test/previewer.c @@ -174,6 +174,8 @@ main(int argc, char *argv[]) /* create a plug to for the socket */ g_debug("Creating plug from window %lu", (unsigned long)sockwin); plug = evbp_plug_new(sockwin); + if (mode == MODE_PLUG) + g_signal_connect(plug, "destroy", G_CALLBACK(gtk_main_quit), NULL); viewer = evbp_viewer_new(); gtk_container_add(GTK_CONTAINER(plug), viewer); gtk_widget_show_all(plug); |