context: Add :unsafe-mode property

We are going to restrict several sensitive D-Bus APIs to a set
of allowed callers (like Settings or portal implementations).

Add an :unsafe-mode property to the context to allow turning off
those restrictions temporarily, in order to not get in the way
of development/debugging.

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:
Florian Müllner
2021-09-01 21:12:03 +02:00
committed by Marge Bot
parent fc05feed35
commit c62e86cb23
2 changed files with 43 additions and 0 deletions

View File

@ -55,6 +55,10 @@ const char * meta_context_get_name (MetaContext *context);
const char * meta_context_get_gnome_wm_keybindings (MetaContext *context);
gboolean meta_context_get_unsafe_mode (MetaContext *context);
void meta_context_set_unsafe_mode (MetaContext *context,
gboolean enable);
META_EXPORT_TEST
MetaWaylandCompositor * meta_context_get_wayland_compositor (MetaContext *context);