+Thu Jul 12 18:12:04 2007 Tim Janik <timj@imendio.com>
+
+ * gdk/tmpl/threads.sgml: clarify section about gdk_threads_enter/
+ gdk_threads_leave to be reworded in terms of events and to mention
+ availability of gdk_threads_add_idle_full().
+
2007-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkrange.sgml:
any other GTK+ or GDK functions in a threaded GTK+ program.
</para>
<para>
-Idles, timeouts, and input functions are executed outside
-of the main GTK+ lock. So, if you need to call GTK+
-inside of such a callback, you must surround the callback
-with a gdk_threads_enter()/gdk_threads_leave() pair.
-(However, signals are still executed within the main
-GTK+ lock.)
+Idles, timeouts, and input functions from GLib, such as g_idle_add(), are
+executed outside of the main GTK+ lock.
+So, if you need to call GTK+ inside of such a callback, you must surround
+the callback with a gdk_threads_enter()/gdk_threads_leave() pair or use
+gdk_threads_add_idle_full() which does this for you.
+However, event dispatching from the mainloop is still executed within
+the main GTK+ lock, so callback functions connected to event signals
+like GtkWidget::button-press-event, do not need thread protection.
</para>
<para>
In particular, this means, if you are writing widgets that might