context: Move X11 display policy under the context

The context implementations already effectively dictate the policy, so
let them do it more directly instead of going indirectly via global
variables.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1861>
This commit is contained in:
Jonas Ådahl
2021-04-16 20:34:29 +02:00
parent e62f7e2910
commit 50ed027b6f
10 changed files with 84 additions and 154 deletions

View File

@ -21,6 +21,7 @@
#ifndef META_CONTEXT_PRIVATE_H
#define META_CONTEXT_PRIVATE_H
#include "core/meta-private-enums.h"
#include "meta/meta-backend.h"
#include "meta/meta-context.h"
#include "wayland/meta-wayland-types.h"
@ -36,6 +37,8 @@ struct _MetaContextClass
MetaCompositorType (* get_compositor_type) (MetaContext *context);
MetaX11DisplayPolicy (* get_x11_display_policy) (MetaContext *context);
gboolean (* setup) (MetaContext *context,
GError **error);
@ -51,4 +54,6 @@ const char * meta_context_get_gnome_wm_keybindings (MetaContext *context);
MetaWaylandCompositor * meta_context_get_wayland_compositor (MetaContext *context);
MetaX11DisplayPolicy meta_context_get_x11_display_policy (MetaContext *context);
#endif /* META_CONTEXT_PRIVATE_H */