From cde0cd5d23687878db8ecd1115aa8a515b5ced0c Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Mon, 18 Jan 2021 18:23:20 +0100 Subject: [PATCH] xwayland: Enable Xwayland on demand by default Make "Xwayland on demand" the default policy when Xwayland supports "initfd" and remove the corresponding experimental feature. Part-of: --- data/org.gnome.mutter.gschema.xml.in | 3 --- src/backends/meta-settings-private.h | 5 ++--- src/backends/meta-settings.c | 2 -- src/core/main.c | 8 +++----- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/data/org.gnome.mutter.gschema.xml.in b/data/org.gnome.mutter.gschema.xml.in index ec8958f81..ef9ab7ae5 100644 --- a/data/org.gnome.mutter.gschema.xml.in +++ b/data/org.gnome.mutter.gschema.xml.in @@ -126,9 +126,6 @@ or user must have CAP_SYS_NICE. Requires a restart. - • “autostart-xwayland” — initializes Xwayland lazily if there are - X11 clients. Requires a restart. - • “dma-buf-screen-sharing" — enables DMA buffered screen sharing. This is already enabled by default when using the i915 driver, but disabled for diff --git a/src/backends/meta-settings-private.h b/src/backends/meta-settings-private.h index 629406550..cde7e0439 100644 --- a/src/backends/meta-settings-private.h +++ b/src/backends/meta-settings-private.h @@ -34,9 +34,8 @@ typedef enum _MetaExperimentalFeature META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0), META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1), META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2), - META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND = (1 << 3), - META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING = (1 << 4), - META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 5), + META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING = (1 << 3), + META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 4), } MetaExperimentalFeature; typedef enum _MetaXwaylandExtension diff --git a/src/backends/meta-settings.c b/src/backends/meta-settings.c index 8d5baaa6f..6a754d4e0 100644 --- a/src/backends/meta-settings.c +++ b/src/backends/meta-settings.c @@ -271,8 +271,6 @@ experimental_features_handler (GVariant *features_variant, feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS; else if (g_str_equal (feature_str, "rt-scheduler")) feature = META_EXPERIMENTAL_FEATURE_RT_SCHEDULER; - else if (g_str_equal (feature_str, "autostart-xwayland")) - feature = META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND; else if (g_str_equal (feature_str, "dma-buf-screen-sharing")) feature = META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING; else if (g_str_equal (feature_str, "autoclose-xwayland")) diff --git a/src/core/main.c b/src/core/main.c index 7c936a3a6..d0b2a48d9 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -794,14 +794,12 @@ meta_get_x11_display_policy (void) #ifdef HAVE_WAYLAND if (meta_is_wayland_compositor ()) { - MetaSettings *settings = meta_backend_get_settings (backend); - if (opt_no_x11) return META_DISPLAY_POLICY_DISABLED; - if (meta_settings_is_experimental_feature_enabled (settings, - META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND)) - return META_DISPLAY_POLICY_ON_DEMAND; +#ifdef HAVE_XWAYLAND_INITFD + return META_DISPLAY_POLICY_ON_DEMAND; +#endif } #endif