[mutter/bilelmoussaoui/ctx-options] cli: Disable X11 specific options




commit 0ce4f1cce65f182d11d894ee21588b947edccf1b
Author: Bilal Elmoussaoui <belmouss redhat com>
Date:   Thu May 26 14:54:15 2022 +0200

    cli: Disable X11 specific options
    
    Related: #2272

 src/core/meta-context-main.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/src/core/meta-context-main.c b/src/core/meta-context-main.c
index fe11b4bb6f..d2445e369a 100644
--- a/src/core/meta-context-main.c
+++ b/src/core/meta-context-main.c
@@ -466,8 +466,10 @@ meta_context_main_create_backend (MetaContext  *context,
   compositor_type = meta_context_get_compositor_type (context);
   switch (compositor_type)
     {
+#ifdef HAVE_X11
     case META_COMPOSITOR_TYPE_X11:
       return create_x11_cm_backend (context, error);
+#endif
     case META_COMPOSITOR_TYPE_WAYLAND:
 #ifdef HAVE_WAYLAND
       if (context_main->options.nested)
@@ -549,6 +551,7 @@ meta_context_main_add_option_entries (MetaContextMain *context_main)
 {
   MetaContext *context = META_CONTEXT (context_main);
   GOptionEntry options[] = {
+#ifdef HAVE_X11
     {
       "replace", 'r', 0, G_OPTION_ARG_NONE,
       &context_main->options.x11.replace,
@@ -585,6 +588,7 @@ meta_context_main_add_option_entries (MetaContextMain *context_main)
       N_("Make X calls synchronous"),
       NULL
     },
+#endif
 #ifdef HAVE_WAYLAND
     {
       "wayland", 0, 0, G_OPTION_ARG_NONE,
@@ -633,11 +637,13 @@ meta_context_main_add_option_entries (MetaContextMain *context_main)
       &context_main->options.unsafe_mode,
       "Run in unsafe mode"
     },
+#ifdef HAVE_X11
     {
       "x11", 0, 0, G_OPTION_ARG_NONE,
       &context_main->options.x11.force,
       N_("Run with X11 backend")
     },
+#endif
     { NULL }
   };
 


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