[mutter/wayland] main: Refactor some code slightly
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] main: Refactor some code slightly
- Date: Tue, 1 Apr 2014 03:49:40 +0000 (UTC)
commit e22e9f5df562bf9986afd960a86453e82869394a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Mar 31 22:55:13 2014 -0400
main: Refactor some code slightly
src/core/main.c | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index d4a8ac3..4ccf75a 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -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);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]