[mutter/wayland] wayland: don't require Clutter backend variables to be set from outside



commit 7360aece746a10786bb0139c691f56ca2a1557d8
Author: Giovanni Campagna <gcampagn redhat com>
Date:   Wed Aug 21 11:43:36 2013 +0200

    wayland: don't require Clutter backend variables to be set from outside
    
    When running under mutter-launch, we can assume we're running on
    bare metal, and set the clutter backend appropriately.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706421

 src/core/main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/core/main.c b/src/core/main.c
index 735474c..2cba35c 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -256,6 +256,14 @@ meta_get_option_context (void)
   bindtextdomain (GETTEXT_PACKAGE, MUTTER_LOCALEDIR);
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
+  /* We must set the windowing backend here, because Clutter creates the backend
+     object when the first call is made.
+
+     We consider running from mutter-launch equivalent to running from bare metal.
+  */
+  if (getenv ("WESTON_LAUNCHER_SOCK"))
+    clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL);
+
   ctx = g_option_context_new (NULL);
   g_option_context_add_main_entries (ctx, meta_options, GETTEXT_PACKAGE);
   g_option_context_add_group (ctx, clutter_get_option_group_without_init ());


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]