xwayland: Warn when autoclose-xwayland is not usable
The experimental feature "autoclose-xwayland" requires a couple of prerequisites: 1. Be able to (re)start Xwayland on demand, i.e. with systemd 2. Xwayland must support the terminate delay Add a warning message if "autoclose-xwayland" was requested but any of those prerequisites is not met. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2258>
This commit is contained in:
parent
6ce80ccc54
commit
b8870a11b8
1 changed files with 17 additions and 6 deletions
|
@ -868,14 +868,25 @@ meta_xwayland_start_xserver (MetaXWaylandManager *manager,
|
|||
args[i++] = XWAYLAND_LISTENFD;
|
||||
args[i++] = "7";
|
||||
#endif
|
||||
#ifdef HAVE_XWAYLAND_TERMINATE_DELAY
|
||||
if (x11_display_policy == META_X11_DISPLAY_POLICY_ON_DEMAND &&
|
||||
meta_settings_is_experimental_feature_enabled (settings,
|
||||
|
||||
if (meta_settings_is_experimental_feature_enabled (settings,
|
||||
META_EXPERIMENTAL_FEATURE_AUTOCLOSE_XWAYLAND))
|
||||
#ifdef HAVE_XWAYLAND_TERMINATE_DELAY
|
||||
{
|
||||
/* Terminate after a 10 seconds delay */
|
||||
args[i++] = "-terminate";
|
||||
args[i++] = "10";
|
||||
if (x11_display_policy == META_X11_DISPLAY_POLICY_ON_DEMAND)
|
||||
{
|
||||
/* Terminate after a 10 seconds delay */
|
||||
args[i++] = "-terminate";
|
||||
args[i++] = "10";
|
||||
}
|
||||
else
|
||||
{
|
||||
g_warning ("autoclose-xwayland disabled, requires Xwayland on demand");
|
||||
}
|
||||
}
|
||||
#else
|
||||
{
|
||||
g_warning ("autoclose-xwayland disabled, not supported");
|
||||
}
|
||||
#endif
|
||||
for (j = 0; j < G_N_ELEMENTS (x11_extension_names); j++)
|
||||
|
|
Loading…
Reference in a new issue