[gnome-shell/wip/wayland: 18/25] wayland: Add a --wayland option



commit 005ef1b8dfd14bd6d7ac49da425b91538aec2b1c
Author: Neil Roberts <neil linux intel com>
Date:   Mon Jun 17 12:30:08 2013 +0100

    wayland: Add a --wayland option
    
    This makes Gnome Shell run as a wayland compositor
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707467

 src/main.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/src/main.c b/src/main.c
index a563c08..88d494f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -22,6 +22,7 @@
 #include <atk-bridge.h>
 #include <telepathy-glib/debug.h>
 #include <telepathy-glib/debug-sender.h>
+#include <meta/util.h>
 
 #include "shell-global.h"
 #include "shell-global-private.h"
@@ -41,6 +42,7 @@ extern GType gnome_shell_plugin_get_type (void);
 
 static gboolean is_gdm_mode = FALSE;
 static char *session_mode = NULL;
+static gboolean is_wayland_compositor = FALSE;
 
 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
@@ -347,6 +349,14 @@ print_version (const gchar    *option_name,
 }
 
 GOptionEntry gnome_shell_options[] = {
+#ifdef HAVE_WAYLAND
+  {
+    "wayland", 0, 0, G_OPTION_ARG_NONE,
+    &is_wayland_compositor,
+    N_("Run as a wayland compositor"),
+    NULL,
+  },
+#endif
   {
     "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
     print_version,
@@ -397,6 +407,10 @@ main (int argc, char **argv)
 
   g_option_context_free (ctx);
 
+#ifdef HAVE_WAYLAND
+  meta_set_is_wayland_compositor (is_wayland_compositor);
+#endif
+
   meta_plugin_manager_set_plugin_type (gnome_shell_plugin_get_type ());
 
   meta_set_wm_name (WM_NAME);


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