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>
This commit is contained in:
parent
c62e86cb23
commit
d17e9adc73
@ -69,6 +69,7 @@ typedef struct _MetaContextMainOptions
|
|||||||
gboolean display_server;
|
gboolean display_server;
|
||||||
gboolean headless;
|
gboolean headless;
|
||||||
#endif
|
#endif
|
||||||
|
gboolean unsafe_mode;
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
GList *virtual_monitor_infos;
|
GList *virtual_monitor_infos;
|
||||||
#endif
|
#endif
|
||||||
@ -389,6 +390,7 @@ meta_context_main_setup (MetaContext *context,
|
|||||||
error))
|
error))
|
||||||
return FALSE;
|
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"));
|
meta_set_syncing (context_main->options.x11.sync || g_getenv ("MUTTER_SYNC"));
|
||||||
|
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
#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)")
|
N_("Add persistent virtual monitor (WxH or WxH@R)")
|
||||||
},
|
},
|
||||||
#endif
|
#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,
|
"x11", 0, 0, G_OPTION_ARG_NONE,
|
||||||
&context_main->options.x11.force,
|
&context_main->options.x11.force,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user