From fb3df5243f2ca85f6c4c0a33dba4ec46ad7c29e1 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 11 Mar 2014 16:32:44 -0400 Subject: [PATCH] main: Add a --display-server option This is an explicit option to launch mutter as a display server, rather than relying on weston-launch. --- src/core/main.c | 9 +++++++-- src/mutter-wayland.desktop.in | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index af6f84817..5c0e1cc1d 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -190,6 +190,7 @@ static gboolean opt_replace_wm; static gboolean opt_disable_sm; static gboolean opt_sync; static gboolean opt_wayland; +static gboolean opt_display_server; static GOptionEntry meta_options[] = { { @@ -233,6 +234,11 @@ static GOptionEntry meta_options[] = { N_("Run as a wayland compositor"), NULL }, + { + "display-server", 0, 0, G_OPTION_ARG_NONE, + &opt_display_server, + N_("Run as a full display server, rather than nested") + }, {NULL} }; @@ -401,8 +407,7 @@ meta_init (void) if (g_getenv ("MUTTER_DEBUG")) meta_set_debugging (TRUE); - /* We consider running from mutter-launch equivalent to running from bare metal. */ - if (getenv ("WESTON_LAUNCHER_SOCK")) + if (opt_display_server) clutter_set_windowing_backend (CLUTTER_WINDOWING_EGL); meta_set_is_wayland_compositor (opt_wayland); diff --git a/src/mutter-wayland.desktop.in b/src/mutter-wayland.desktop.in index ebf144741..9f213166a 100644 --- a/src/mutter-wayland.desktop.in +++ b/src/mutter-wayland.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] Type=Application _Name=Mutter (wayland compositor) -Exec=mutter-launch -- mutter --wayland +Exec=mutter-launch -- mutter --wayland --display-server NoDisplay=true # name of loadable control center module X-GNOME-WMSettingsModule=metacity