changeset 18425:84d318eadc62

The input was causing some weird issues. This fixes it.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 03 Jul 2007 11:09:19 +0000
parents 0b71d043a1f1
children 841670dd24e1
files finch/libgnt/gntmain.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntmain.c	Tue Jul 03 11:07:53 2007 +0000
+++ b/finch/libgnt/gntmain.c	Tue Jul 03 11:09:19 2007 +0000
@@ -65,6 +65,7 @@
  */
 
 static GIOChannel *channel = NULL;
+static int channel_read_callback;
 
 static gboolean ascii_only;
 static gboolean mouse_enabled;
@@ -293,7 +294,7 @@
 	g_io_channel_set_flags(channel, G_IO_FLAG_NONBLOCK, NULL );
 #endif
 
-	result = g_io_add_watch_full(channel,  G_PRIORITY_HIGH,
+	channel_read_callback = result = g_io_add_watch_full(channel,  G_PRIORITY_HIGH,
 					(G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI),
 					io_invoke, NULL, NULL);
 	
@@ -656,6 +657,7 @@
 			&pid, stin, stout, sterr, NULL))
 		return FALSE;
 
+	g_source_remove(channel_read_callback);
 	wm->mode = GNT_KP_MODE_WAIT_ON_CHILD;
 	g_child_watch_add(pid, reap_child, NULL);