[mutter/wip/wayland-stacking: 5/7] Adds a --display-server option



commit 264b2f5b68616432058f460f753dff124b0c65df
Author: Robert Bragg <robert linux intel com>
Date:   Fri May 3 00:57:28 2013 +0100

    Adds a --display-server option
    
    This adds a --display-server option to mutter so mutter no longer runs
    as a classic X compositor with an output window mapped on the X
    Composite Overlay Window and in fact no longer assumes it is running
    directly under X. In this mode Mutter will itself launch a headless X
    server and display output is handled with Clutter and Cogl. This enables
    running Mutter nested as an application within an X session and will
    also enable Mutter to directly manage the display hardware itself.

 src/core/mutter.c |    9 +++++++++
 src/core/util.c   |   13 +++++++++++++
 src/meta/util.h   |    2 ++
 3 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/src/core/mutter.c b/src/core/mutter.c
index 3216726..b548690 100644
--- a/src/core/mutter.c
+++ b/src/core/mutter.c
@@ -46,9 +46,16 @@ print_version (const gchar    *option_name,
 }
 
 static gchar *plugin = "default";
+static gboolean opt_is_display_server = FALSE;
 
 GOptionEntry mutter_options[] = {
   {
+    "display-server", 0, 0, G_OPTION_ARG_NONE,
+    &opt_is_display_server,
+    N_("Run as a display server"),
+    NULL,
+  },
+  {
     "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
     print_version,
     N_("Print version"),
@@ -77,6 +84,8 @@ main (int argc, char **argv)
       exit (1);
     }
 
+  meta_set_is_display_server (opt_is_display_server);
+
   if (plugin)
     meta_plugin_manager_load (plugin);
 
diff --git a/src/core/util.c b/src/core/util.c
index 92a33e4..b37cc00 100644
--- a/src/core/util.c
+++ b/src/core/util.c
@@ -55,6 +55,7 @@ static gint verbose_topics = 0;
 static gboolean is_debugging = FALSE;
 static gboolean replace_current = FALSE;
 static int no_prefix = 0;
+static gboolean is_display_server = FALSE;
 
 #ifdef WITH_VERBOSE_MODE
 static FILE* logfile = NULL;
@@ -194,6 +195,18 @@ meta_set_replace_current_wm (gboolean setting)
   replace_current = setting;
 }
 
+gboolean
+meta_is_display_server (void)
+{
+  return is_display_server;
+}
+
+void
+meta_set_is_display_server (gboolean value)
+{
+  is_display_server = value;
+}
+
 char *
 meta_g_utf8_strndup (const gchar *src,
                      gsize        n)
diff --git a/src/meta/util.h b/src/meta/util.h
index be87190..c0252bb 100644
--- a/src/meta/util.h
+++ b/src/meta/util.h
@@ -37,6 +37,8 @@ void     meta_set_debugging (gboolean setting);
 gboolean meta_is_syncing (void);
 void     meta_set_syncing (gboolean setting);
 void     meta_set_replace_current_wm (gboolean setting);
+gboolean meta_is_display_server (void);
+void     meta_set_is_display_server (gboolean setting);
 
 void meta_debug_spew_real (const char *format,
                            ...) G_GNUC_PRINTF (1, 2);


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