diff options
author | Olivier Fourdan <ofourdan@redhat.com> | 2021-03-17 15:44:45 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2022-01-26 14:42:22 +0100 |
commit | 42855b69e7b37e229e6a8a6c4fb129c94141e899 (patch) | |
tree | f50e5a5e2c5c955a2bf15db4460d94ac8b012fbb /config.h.meson | |
parent | ffa5fd776d16b7b64fe62f54c1c62e6e56d284e8 (diff) | |
download | mutter-42855b69e7b37e229e6a8a6c4fb129c94141e899.tar.gz |
xwayland: Mark our X11 connection terminatable
The connection to the Xserver for the X11 window manager part of mutter
even on Wayland may prevent the Xserver from shutting down.
Currently, what mutter does is to check the X11 clients still connected
to Xwayland using the XRes extension, with a list of X11 clients that
can be safely ignored (typically the GNOME XSettings daemon, the IBus
daemon, pulseaudio and even mutter window manager itself).
When there is just those known clients remaining, mutter would kill
Xwayland automatically.
But that's racy, because between the time mutter checks with Xwayland
the remaining clients and the time it actually kills the process, a new
X11 client might have come along and won't be able to connect to
Xwayland that mutter is just about to kill.
Because of that, the feature “autoclose-xwayland” is marked as an
experimental feature in mutter and not enabled by default.
Thankfully, the Xserver has all it takes to manage that already, and
is even capable of terminating itself once all X11 clients are gone (the
-terminate option on the command line).
With XFixes version 6, the X11 clients can declare themselves
"terminatable", so that the Xserver could simply ignore those X11
clients when checking the remaining clients and terminate itself
automatically.
Use that mechanism to declare mutter's own connection to the Xserver as
"terminatable" when Xwayland is started on demand so that it won't hold
Xwayland alive for the sole purpose of mutter itself.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1794>
Diffstat (limited to 'config.h.meson')
-rw-r--r-- | config.h.meson | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/config.h.meson b/config.h.meson index b7ca736df..4939d2a73 100644 --- a/config.h.meson +++ b/config.h.meson @@ -91,3 +91,6 @@ /* List of executable names to ignore when terminating Xwayland */ #mesondefine XWAYLAND_IGNORE_EXECUTABLES + +/* Whether the Xwayland -terminate supports a delay */ +#mesondefine HAVE_XWAYLAND_TERMINATE_DELAY |