[mutter] core: move backend setting to helper function
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] core: move backend setting to helper function
- Date: Fri, 6 Nov 2015 21:23:19 +0000 (UTC)
commit db4355ba1e76dc3186b2fa1e76a1277e0b8bb25d
Author: Ray Strode <rstrode redhat com>
Date: Wed Dec 17 12:48:06 2014 -0500
core: move backend setting to helper function
This paves the way for making the backend setting
be more automatic.
https://bugzilla.gnome.org/show_bug.cgi?id=741666
src/core/main.c | 26 ++++++++++++++++----------
1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 3189f84..ec9b589 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -291,6 +291,21 @@ on_sigterm (gpointer user_data)
return G_SOURCE_REMOVE;
}
+static void
+init_backend (void)
+{
+#if defined(CLUTTER_WINDOWING_EGL) && defined(HAVE_NATIVE_BACKEND)
+ if (opt_display_server)
+ clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
+ else
+#endif
+ clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
+
+#ifdef HAVE_WAYLAND
+ meta_set_is_wayland_compositor (opt_wayland);
+#endif
+}
+
/**
* meta_init: (skip)
*
@@ -323,16 +338,7 @@ meta_init (void)
if (g_getenv ("MUTTER_DEBUG"))
meta_set_debugging (TRUE);
-#if defined(CLUTTER_WINDOWING_EGL) && defined(HAVE_NATIVE_BACKEND)
- if (opt_display_server)
- clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
- else
-#endif
- clutter_set_windowing_backend (CLUTTER_WINDOWING_X11);
-
-#ifdef HAVE_WAYLAND
- meta_set_is_wayland_compositor (opt_wayland);
-#endif
+ init_backend ();
if (g_get_home_dir ())
if (chdir (g_get_home_dir ()) < 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]