summaryrefslogtreecommitdiff
path: root/gtk/gtkuimanager.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-06 04:33:40 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-06 04:33:40 +0000
commitf7048ba1e14d64287e402d6064c8a63d00bb9ee1 (patch)
tree3c0b2eff622e524df03462ec1f45c454aa93f8d6 /gtk/gtkuimanager.c
parent2a74feb04c169b2beb71d6d37968d8b53cee44b8 (diff)
downloadgtk+-f7048ba1e14d64287e402d6064c8a63d00bb9ee1.tar.gz
Only call GDK_THREADS_ENTER() / _LEAVE() when called from an idle handler.
Tue Jul 6 00:29:03 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkuimanager.c (do_updates): (do_updates_idle): Only call GDK_THREADS_ENTER() / _LEAVE() when called from an idle handler. (#145429, Jan-Marek Glogowski)
Diffstat (limited to 'gtk/gtkuimanager.c')
-rw-r--r--gtk/gtkuimanager.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gtk/gtkuimanager.c b/gtk/gtkuimanager.c
index 7248628f08..220a2c2bd7 100644
--- a/gtk/gtkuimanager.c
+++ b/gtk/gtkuimanager.c
@@ -2495,10 +2495,18 @@ update_node (GtkUIManager *self,
}
static gboolean
-do_updates (GtkUIManager *self)
+do_updates_idle (GtkUIManager *self)
{
GDK_THREADS_ENTER ();
+ do_updates (self);
+ GDK_THREADS_LEAVE ();
+
+ return FALSE;
+}
+static gboolean
+do_updates (GtkUIManager *self)
+{
/* this function needs to check through the tree for dirty nodes.
* For such nodes, it needs to do the following:
*
@@ -2515,8 +2523,6 @@ do_updates (GtkUIManager *self)
self->private_data->update_tag = 0;
- GDK_THREADS_LEAVE ();
-
return FALSE;
}
@@ -2526,7 +2532,8 @@ queue_update (GtkUIManager *self)
if (self->private_data->update_tag != 0)
return;
- self->private_data->update_tag = g_idle_add ((GSourceFunc)do_updates, self);
+ self->private_data->update_tag = g_idle_add ((GSourceFunc)do_updates_idle,
+ self);
}