xwayland: terminate when no client is connected

Automatically shutdown Xwayland 10s after all X11 clients have
gone away.
This commit is contained in:
Simon Ser 2021-06-25 13:49:47 +02:00 committed by Kenny Levinsen
parent 352064d76d
commit f575e445ec
4 changed files with 19 additions and 0 deletions

View file

@ -88,6 +88,9 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
struct wlr_xwayland_server_options options = {
.lazy = lazy,
.enable_wm = true,
#if HAS_XCB_XFIXES_SET_CLIENT_DISCONNECT_MODE
.terminate_delay = lazy ? 10 : 0,
#endif
};
xwayland->server = wlr_xwayland_server_create(wl_display, &options);
if (xwayland->server == NULL) {