x11: Check for initialized context when enabling ARGB visuals

Instead of using the backend singleton. This allows lazy initialization
of Clutter.

http://bugzilla.clutter-project.org/show_bug.cgi?id=2435
This commit is contained in:
Emmanuele Bassi 2010-11-24 12:02:38 +00:00
parent 6a552e27ab
commit 446107f19d

View File

@ -968,7 +968,7 @@ clutter_x11_has_composite_extension (void)
void void
clutter_x11_set_use_argb_visual (gboolean use_argb) clutter_x11_set_use_argb_visual (gboolean use_argb)
{ {
if (backend_singleton != NULL) if (_clutter_context_is_initialized ())
{ {
g_warning ("%s() can only be used before calling clutter_init()", g_warning ("%s() can only be used before calling clutter_init()",
G_STRFUNC); G_STRFUNC);