wayland: Add a --display-server option

This makes Gnome Shell run as its own display server.
This commit is contained in:
Neil Roberts 2013-06-17 12:30:08 +01:00
parent 536ff6f561
commit d663beab97

View File

@ -22,6 +22,7 @@
#include <atk-bridge.h> #include <atk-bridge.h>
#include <telepathy-glib/debug.h> #include <telepathy-glib/debug.h>
#include <telepathy-glib/debug-sender.h> #include <telepathy-glib/debug-sender.h>
#include <meta/util.h>
#include "shell-global.h" #include "shell-global.h"
#include "shell-global-private.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 gboolean is_gdm_mode = FALSE;
static char *session_mode = NULL; static char *session_mode = NULL;
static gboolean is_display_server = FALSE;
#define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
#define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
@ -347,6 +349,12 @@ print_version (const gchar *option_name,
} }
GOptionEntry gnome_shell_options[] = { GOptionEntry gnome_shell_options[] = {
{
"display-server", 0, 0, G_OPTION_ARG_NONE,
&is_display_server,
N_("Run as a display server"),
NULL,
},
{ {
"version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, "version", 0, G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK,
print_version, print_version,
@ -396,6 +404,8 @@ main (int argc, char **argv)
g_option_context_free (ctx); g_option_context_free (ctx);
meta_set_is_display_server (is_display_server);
meta_plugin_manager_set_plugin_type (gnome_shell_plugin_get_type ()); meta_plugin_manager_set_plugin_type (gnome_shell_plugin_get_type ());
meta_set_wm_name (WM_NAME); meta_set_wm_name (WM_NAME);