g_source_set_name on custom sources (if available)

Call g_source_set_name, if the versio of GLib is new enough.
This aids debugging, using e.g. SystemTap.  See
https://bugzilla.gnome.org/show_bug.cgi?id=620511
for more information

http://bugzilla.openedhand.com/show_bug.cgi?id=2151

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
This commit is contained in:
Colin Walters
2010-06-03 23:34:09 -04:00
committed by Emmanuele Bassi
parent e9c4dfff90
commit f0ded315e4
4 changed files with 15 additions and 0 deletions

View File

@ -377,6 +377,10 @@ clutter_timeout_pool_new (gint priority)
if (!source)
return NULL;
#if GLIB_CHECK_VERSION (2, 25, 8)
g_source_set_name (source, "Clutter timeout pool");
#endif
if (priority != G_PRIORITY_DEFAULT)
g_source_set_priority (source, priority);