main: Refactor some code slightly

This commit is contained in:
Jasper St. Pierre 2014-03-31 22:55:13 -04:00
parent 20547e3b63
commit e22e9f5df5

View File

@ -318,19 +318,17 @@ static GSourceFuncs event_funcs = {
static void
meta_clutter_init (void)
{
GSource *source;
clutter_x11_set_display (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()));
clutter_x11_disable_event_retrieval ();
if (CLUTTER_INIT_SUCCESS == clutter_init (NULL, NULL))
{
GSource *source = g_source_new (&event_funcs, sizeof (GSource));
g_source_attach (source, NULL);
g_source_unref (source);
}
else
{
meta_fatal ("Unable to initialize Clutter.\n");
}
if (clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS)
meta_fatal ("Unable to initialize Clutter.\n");
source = g_source_new (&event_funcs, sizeof (GSource));
g_source_attach (source, NULL);
g_source_unref (source);
}
/**