[mutter] context: Add (hidden) --unsafe-mode option



commit d17e9adc739022f65ddac1b8856f479d9b876cbe
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 2 18:41:16 2021 +0200

    context: Add (hidden) --unsafe-mode option
    
    When running gnome-shell, it is possible to toggle unsafe-mode in
    looking glass. We'll eventually start using the property in mutter
    as well, so to make stand-alone debugging easier, also expose it
    as a hidden command line option.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3943
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1983>

 src/core/meta-context-main.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/core/meta-context-main.c b/src/core/meta-context-main.c
index 8f669151aa..a81ea9f9f1 100644
--- a/src/core/meta-context-main.c
+++ b/src/core/meta-context-main.c
@@ -69,6 +69,7 @@ typedef struct _MetaContextMainOptions
   gboolean display_server;
   gboolean headless;
 #endif
+  gboolean unsafe_mode;
 #ifdef HAVE_NATIVE_BACKEND
   GList *virtual_monitor_infos;
 #endif
@@ -389,6 +390,7 @@ meta_context_main_setup (MetaContext  *context,
                                                                    error))
     return FALSE;
 
+  meta_context_set_unsafe_mode (context, context_main->options.unsafe_mode);
   meta_set_syncing (context_main->options.x11.sync || g_getenv ("MUTTER_SYNC"));
 
 #ifdef HAVE_NATIVE_BACKEND
@@ -626,6 +628,11 @@ meta_context_main_add_option_entries (MetaContextMain *context_main)
       N_("Add persistent virtual monitor (WxH or WxH@R)")
     },
 #endif
+    {
+      "unsafe-mode", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE,
+      &context_main->options.unsafe_mode,
+      "Run in unsafe mode"
+    },
     {
       "x11", 0, 0, G_OPTION_ARG_NONE,
       &context_main->options.x11.force,


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