[mutter] xwayland: Warn when autoclose-xwayland is not usable
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] xwayland: Warn when autoclose-xwayland is not usable
- Date: Fri, 28 Jan 2022 16:17:20 +0000 (UTC)
commit b8870a11b8fdb066bbd2ce9b07cd3abc660e9008
Author: Olivier Fourdan <ofourdan redhat com>
Date: Fri Jan 28 09:56:24 2022 +0100
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>
src/wayland/meta-xwayland.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index f2485d2bc6..5d1846dfcd 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -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
+ {
+ 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
{
- /* Terminate after a 10 seconds delay */
- args[i++] = "-terminate";
- args[i++] = "10";
+ g_warning ("autoclose-xwayland disabled, not supported");
}
#endif
for (j = 0; j < G_N_ELEMENTS (x11_extension_names); j++)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]