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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
This commit is contained in:
Olivier Fourdan 2021-01-18 18:23:20 +01:00
parent 3fc603edd3
commit cde0cd5d23
4 changed files with 5 additions and 13 deletions

View File

@ -126,9 +126,6 @@
or user must have CAP_SYS_NICE. or user must have CAP_SYS_NICE.
Requires a restart. 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 • “dma-buf-screen-sharing" — enables DMA buffered screen sharing. This
is already enabled by default when using is already enabled by default when using
the i915 driver, but disabled for the i915 driver, but disabled for

View File

@ -34,9 +34,8 @@ typedef enum _MetaExperimentalFeature
META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0), META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER = (1 << 0),
META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1), META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS = (1 << 1),
META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2), META_EXPERIMENTAL_FEATURE_RT_SCHEDULER = (1 << 2),
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND = (1 << 3), META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING = (1 << 3),
META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING = (1 << 4), META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 4),
META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND = (1 << 5),
} MetaExperimentalFeature; } MetaExperimentalFeature;
typedef enum _MetaXwaylandExtension typedef enum _MetaXwaylandExtension

View File

@ -271,8 +271,6 @@ experimental_features_handler (GVariant *features_variant,
feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS; feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
else if (g_str_equal (feature_str, "rt-scheduler")) else if (g_str_equal (feature_str, "rt-scheduler"))
feature = META_EXPERIMENTAL_FEATURE_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")) else if (g_str_equal (feature_str, "dma-buf-screen-sharing"))
feature = META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING; feature = META_EXPERIMENTAL_FEATURE_DMA_BUF_SCREEN_SHARING;
else if (g_str_equal (feature_str, "autoclose-xwayland")) else if (g_str_equal (feature_str, "autoclose-xwayland"))

View File

@ -794,14 +794,12 @@ meta_get_x11_display_policy (void)
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
if (meta_is_wayland_compositor ()) if (meta_is_wayland_compositor ())
{ {
MetaSettings *settings = meta_backend_get_settings (backend);
if (opt_no_x11) if (opt_no_x11)
return META_DISPLAY_POLICY_DISABLED; return META_DISPLAY_POLICY_DISABLED;
if (meta_settings_is_experimental_feature_enabled (settings, #ifdef HAVE_XWAYLAND_INITFD
META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND)) return META_DISPLAY_POLICY_ON_DEMAND;
return META_DISPLAY_POLICY_ON_DEMAND; #endif
} }
#endif #endif