mirror of
https://github.com/brl/mutter.git
synced 2025-02-18 06:04:10 +00:00
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:
parent
e9c4dfff90
commit
f0ded315e4
@ -101,6 +101,10 @@ clutter_frame_source_add_full (gint priority,
|
|||||||
if (priority != G_PRIORITY_DEFAULT)
|
if (priority != G_PRIORITY_DEFAULT)
|
||||||
g_source_set_priority (source, priority);
|
g_source_set_priority (source, priority);
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION (2, 25, 8)
|
||||||
|
g_source_set_name (source, "Clutter frame timeout");
|
||||||
|
#endif
|
||||||
|
|
||||||
g_source_set_callback (source, func, data, notify);
|
g_source_set_callback (source, func, data, notify);
|
||||||
|
|
||||||
ret = g_source_attach (source, NULL);
|
ret = g_source_attach (source, NULL);
|
||||||
|
@ -260,6 +260,9 @@ clutter_clock_source_new (ClutterMasterClock *master_clock)
|
|||||||
GSource *source = g_source_new (&clock_funcs, sizeof (ClutterClockSource));
|
GSource *source = g_source_new (&clock_funcs, sizeof (ClutterClockSource));
|
||||||
ClutterClockSource *clock_source = (ClutterClockSource *) source;
|
ClutterClockSource *clock_source = (ClutterClockSource *) source;
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION (2, 25, 8)
|
||||||
|
g_source_set_name (source, "Clutter master clock");
|
||||||
|
#endif
|
||||||
clock_source->master_clock = master_clock;
|
clock_source->master_clock = master_clock;
|
||||||
|
|
||||||
return source;
|
return source;
|
||||||
|
@ -377,6 +377,10 @@ clutter_timeout_pool_new (gint priority)
|
|||||||
if (!source)
|
if (!source)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION (2, 25, 8)
|
||||||
|
g_source_set_name (source, "Clutter timeout pool");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (priority != G_PRIORITY_DEFAULT)
|
if (priority != G_PRIORITY_DEFAULT)
|
||||||
g_source_set_priority (source, priority);
|
g_source_set_priority (source, priority);
|
||||||
|
|
||||||
|
@ -105,6 +105,10 @@ clutter_event_source_new (ClutterBackend *backend)
|
|||||||
GSource *source = g_source_new (&event_funcs, sizeof (ClutterEventSource));
|
GSource *source = g_source_new (&event_funcs, sizeof (ClutterEventSource));
|
||||||
ClutterEventSource *event_source = (ClutterEventSource *) source;
|
ClutterEventSource *event_source = (ClutterEventSource *) source;
|
||||||
|
|
||||||
|
#if GLIB_CHECK_VERSION (2, 25, 8)
|
||||||
|
g_source_set_name (source, "Clutter X11 Event");
|
||||||
|
#endif
|
||||||
|
|
||||||
event_source->backend = backend;
|
event_source->backend = backend;
|
||||||
|
|
||||||
return source;
|
return source;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user