mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 15:40:41 -05:00
xwayland: Make autoclose-xwayland an exp. feature
Closing automatically Xwayland once all relevant X11 clients are gone is inherently racy, if a new client comes along right at the time we're killing Xwayland. Fixing the possible race conditions between mutter, Xwayland and the X11 clients may take some time. Meanwhile, make that an experimental feature "autoclose-xwayland". Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1673>
This commit is contained in:
parent
c255031b6d
commit
3fc603edd3
@ -133,6 +133,11 @@
|
||||
is already enabled by default when using
|
||||
the i915 driver, but disabled for
|
||||
everything else. Requires a restart.
|
||||
|
||||
• “autoclose-xwayland” — Automatically terminates Xwayland if all
|
||||
relevant X11 clients are gone. Does not
|
||||
require a restart.
|
||||
|
||||
</description>
|
||||
</key>
|
||||
|
||||
|
@ -36,6 +36,7 @@ typedef enum _MetaExperimentalFeature
|
||||
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),
|
||||
} MetaExperimentalFeature;
|
||||
|
||||
typedef enum _MetaXwaylandExtension
|
||||
|
@ -275,6 +275,8 @@ experimental_features_handler (GVariant *features_variant,
|
||||
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"))
|
||||
feature = META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND;
|
||||
|
||||
if (feature)
|
||||
g_message ("Enabling experimental feature '%s'", feature_str);
|
||||
|
@ -529,6 +529,11 @@ shutdown_xwayland_cb (gpointer data)
|
||||
{
|
||||
MetaXWaylandManager *manager = data;
|
||||
MetaDisplay *display = meta_get_display ();
|
||||
MetaBackend *backend = meta_get_backend ();
|
||||
|
||||
if (!meta_settings_is_experimental_feature_enabled (meta_backend_get_settings (backend),
|
||||
META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND))
|
||||
return G_SOURCE_REMOVE;
|
||||
|
||||
if (!can_terminate_xwayland (display->x11_display->xdisplay))
|
||||
return G_SOURCE_CONTINUE;
|
||||
|
Loading…
Reference in New Issue
Block a user