Revert "main: Add --x11 command line argument"

This reverts commit feb4c36659.
This commit is contained in:
Jonas Ådahl 2016-07-20 17:45:18 +08:00
parent f18e2a8c31
commit a75e2ace82

View File

@ -167,7 +167,6 @@ static gchar *opt_client_id;
static gboolean opt_replace_wm; static gboolean opt_replace_wm;
static gboolean opt_disable_sm; static gboolean opt_disable_sm;
static gboolean opt_sync; static gboolean opt_sync;
static gboolean opt_x11;
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
static gboolean opt_wayland; static gboolean opt_wayland;
static gboolean opt_nested; static gboolean opt_nested;
@ -212,12 +211,6 @@ static GOptionEntry meta_options[] = {
N_("Make X calls synchronous"), N_("Make X calls synchronous"),
NULL NULL
}, },
{
"x11", 0, 0, G_OPTION_ARG_NONE,
&opt_x11,
N_("Run as a X11 compositing manager"),
NULL
},
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
{ {
"wayland", 0, 0, G_OPTION_ARG_NONE, "wayland", 0, 0, G_OPTION_ARG_NONE,
@ -383,34 +376,20 @@ calculate_compositor_configuration (MetaCompositorType *compositor_type,
MetaBackendType *backend_type) MetaBackendType *backend_type)
{ {
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
gboolean run_as_wayland_compositor; gboolean run_as_wayland_compositor = opt_wayland;
if (opt_x11 && opt_nested)
{
meta_warning ("Can't run both as a Wayland compositor and a X11 compositing manager\n");
meta_exit (META_EXIT_ERROR);
}
run_as_wayland_compositor = opt_wayland || !opt_x11;
#ifdef HAVE_NATIVE_BACKEND #ifdef HAVE_NATIVE_BACKEND
if (opt_x11 && opt_display_server)
{
meta_warning ("Can't run both as a Wayland compositor and a X11 compositing manager\n");
meta_exit (META_EXIT_ERROR);
}
if (opt_nested && opt_display_server) if (opt_nested && opt_display_server)
{ {
meta_warning ("Can't run both as nested and as a display server\n"); meta_warning ("Can't run both as nested and as a display server\n");
meta_exit (META_EXIT_ERROR); meta_exit (META_EXIT_ERROR);
} }
if (!run_as_wayland_compositor && !opt_x11) if (!run_as_wayland_compositor)
run_as_wayland_compositor = check_for_wayland_session_type (); run_as_wayland_compositor = check_for_wayland_session_type ();
#ifdef CLUTTER_WINDOWING_EGL #ifdef CLUTTER_WINDOWING_EGL
if (opt_display_server || (run_as_wayland_compositor && !opt_nested && !opt_x11)) if (opt_display_server || (run_as_wayland_compositor && !opt_nested))
*backend_type = META_BACKEND_TYPE_NATIVE; *backend_type = META_BACKEND_TYPE_NATIVE;
else else
#endif #endif