main: Refactor some code slightly
This commit is contained in:
parent
20547e3b63
commit
e22e9f5df5
@ -318,19 +318,17 @@ static GSourceFuncs event_funcs = {
|
|||||||
static void
|
static void
|
||||||
meta_clutter_init (void)
|
meta_clutter_init (void)
|
||||||
{
|
{
|
||||||
|
GSource *source;
|
||||||
|
|
||||||
clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
|
||||||
clutter_x11_disable_event_retrieval ();
|
clutter_x11_disable_event_retrieval ();
|
||||||
|
|
||||||
if (CLUTTER_INIT_SUCCESS == clutter_init (NULL, NULL))
|
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
|
||||||
{
|
meta_fatal ("Unable to initialize Clutter.\n");
|
||||||
GSource *source = g_source_new (&event_funcs, sizeof (GSource));
|
|
||||||
g_source_attach (source, NULL);
|
source = g_source_new (&event_funcs, sizeof (GSource));
|
||||||
g_source_unref (source);
|
g_source_attach (source, NULL);
|
||||||
}
|
g_source_unref (source);
|
||||||
else
|
|
||||||
{
|
|
||||||
meta_fatal ("Unable to initialize Clutter.\n");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user