diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index b70fb77c2..131a4a1a2 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -1052,10 +1052,19 @@ clutter_get_debug_enabled (void) #endif } +gboolean +_clutter_context_is_initialized (void) +{ + if (ClutterCntx == NULL) + return FALSE; + + return ClutterCntx->is_initialized; +} + ClutterMainContext * _clutter_context_get_default (void) { - if (G_UNLIKELY(!ClutterCntx)) + if (G_UNLIKELY (ClutterCntx == NULL)) { ClutterMainContext *ctx; @@ -1067,7 +1076,7 @@ _clutter_context_get_default (void) ctx->motion_events_per_actor = TRUE; #ifdef CLUTTER_ENABLE_DEBUG - ctx->timer = g_timer_new (); + ctx->timer = g_timer_new (); g_timer_start (ctx->timer); #endif } diff --git a/clutter/clutter-private.h b/clutter/clutter-private.h index ea811978b..db2c0cd7c 100644 --- a/clutter/clutter-private.h +++ b/clutter/clutter-private.h @@ -138,6 +138,7 @@ struct _ClutterMainContext #define CLUTTER_CONTEXT() (_clutter_context_get_default ()) ClutterMainContext *_clutter_context_get_default (void); +gboolean _clutter_context_is_initialized (void); PangoContext *_clutter_context_create_pango_context (ClutterMainContext *self); PangoContext *_clutter_context_get_pango_context (ClutterMainContext *self);