From e0e04dd8474fe8d49f7bddcf4a5e8437a804149e Mon Sep 17 00:00:00 2001 From: Kristian Rietveld Date: Fri, 6 Jun 2003 21:42:52 +0000 Subject: [PATCH] Merged from stable. Fri Jun 6 23:38:23 2003 Kristian Rietveld Merged from stable. * gtk/gtktreeview.c (do_expand_collapse), (expand_collapse_timeout), (cancel_arrow_animation): made expand_collapse_timeout a wrapper with locks around do_expand_collapse, made cancel_arrow_animation use do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from Peter Bloomfield). --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gtk/gtktreeview.c | 24 ++++++++++++++++-------- 6 files changed, 71 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27cae7064..5c54474eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Fri Jun 6 23:38:23 2003 Kristian Rietveld + + Merged from stable. + + * gtk/gtktreeview.c (do_expand_collapse), + (expand_collapse_timeout), (cancel_arrow_animation): made + expand_collapse_timeout a wrapper with locks around + do_expand_collapse, made cancel_arrow_animation use + do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from + Peter Bloomfield). + Fri Jun 6 11:05:45 2003 Hidetoshi Tajima * modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 27cae7064..5c54474eb 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Fri Jun 6 23:38:23 2003 Kristian Rietveld + + Merged from stable. + + * gtk/gtktreeview.c (do_expand_collapse), + (expand_collapse_timeout), (cancel_arrow_animation): made + expand_collapse_timeout a wrapper with locks around + do_expand_collapse, made cancel_arrow_animation use + do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from + Peter Bloomfield). + Fri Jun 6 11:05:45 2003 Hidetoshi Tajima * modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 27cae7064..5c54474eb 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Fri Jun 6 23:38:23 2003 Kristian Rietveld + + Merged from stable. + + * gtk/gtktreeview.c (do_expand_collapse), + (expand_collapse_timeout), (cancel_arrow_animation): made + expand_collapse_timeout a wrapper with locks around + do_expand_collapse, made cancel_arrow_animation use + do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from + Peter Bloomfield). + Fri Jun 6 11:05:45 2003 Hidetoshi Tajima * modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 27cae7064..5c54474eb 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Fri Jun 6 23:38:23 2003 Kristian Rietveld + + Merged from stable. + + * gtk/gtktreeview.c (do_expand_collapse), + (expand_collapse_timeout), (cancel_arrow_animation): made + expand_collapse_timeout a wrapper with locks around + do_expand_collapse, made cancel_arrow_animation use + do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from + Peter Bloomfield). + Fri Jun 6 11:05:45 2003 Hidetoshi Tajima * modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 27cae7064..5c54474eb 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Fri Jun 6 23:38:23 2003 Kristian Rietveld + + Merged from stable. + + * gtk/gtktreeview.c (do_expand_collapse), + (expand_collapse_timeout), (cancel_arrow_animation): made + expand_collapse_timeout a wrapper with locks around + do_expand_collapse, made cancel_arrow_animation use + do_expand_collapse. Fixes threadlock. (Fixes #111286, patch from + Peter Bloomfield). + Fri Jun 6 11:05:45 2003 Hidetoshi Tajima * modules/input/gtkimcontextxim.h (struct _GtkIMContextXIM): diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c index f0fa79588..42cb617c7 100644 --- a/gtk/gtktreeview.c +++ b/gtk/gtktreeview.c @@ -349,6 +349,7 @@ static void gtk_tree_view_real_set_cursor (GtkTreeView 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, @@ -6441,7 +6442,7 @@ static void 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; } @@ -9175,14 +9176,25 @@ gtk_tree_view_expand_all (GtkTreeView *tree_view) 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; @@ -9231,13 +9243,9 @@ expand_collapse_timeout (gpointer data) { gtk_tree_view_queue_draw_arrow (tree_view, tree, node, NULL); - GDK_THREADS_LEAVE (); - return TRUE; } - GDK_THREADS_LEAVE (); - return FALSE; } -- 2.43.2