Index: gtk/gtktreeview.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktreeview.c,v
retrieving revision 1.314
diff -u -r1.314 gtktreeview.c
--- gtk/gtktreeview.c	17 Apr 2003 14:00:45 -0000	1.314
+++ gtk/gtktreeview.c	22 Apr 2003 14:32:50 -0000
@@ -349,6 +349,7 @@
 static gboolean gtk_tree_view_has_special_cell               (GtkTreeView       *tree_view);
 
 static gboolean expand_collapse_timeout                      (gpointer           data);
+static gboolean do_expand_collapse                           (GtkTreeView       *tree_view);
 
 /* interactive search */
 static void     gtk_tree_view_search_dialog_destroy     (GtkWidget        *search_dialog,
@@ -6400,7 +6401,7 @@
 cancel_arrow_animation (GtkTreeView *tree_view)
 {
   if (tree_view->priv->expand_collapse_timeout)
-    while (expand_collapse_timeout (tree_view));
+    while (do_expand_collapse (tree_view));
   tree_view->priv->expand_collapse_timeout = 0;
 }
 
@@ -9086,14 +9087,25 @@
 static gboolean
 expand_collapse_timeout (gpointer data)
 {
-  GtkTreeView *tree_view = data;
+  gboolean retval;
+
+  GDK_THREADS_ENTER ();
+
+  retval = do_expand_collapse (data)
+
+  GDK_THREADS_LEAVE ();
+
+  return retval;
+}
+
+static gboolean
+do_expand_collapse (GtkTreeView *tree_view)
+{
   GtkRBNode *node;
   GtkRBTree *tree;
   gboolean expanding;
   gboolean redraw;
 
-  GDK_THREADS_ENTER ();
-
   redraw = FALSE;
   expanding = TRUE;
 
@@ -9142,12 +9154,8 @@
     {
       gtk_tree_view_queue_draw_arrow (tree_view, tree, node, NULL);
 
-      GDK_THREADS_LEAVE ();
-
       return TRUE;
     }
-
-  GDK_THREADS_LEAVE ();
 
   return FALSE;
 }
