From eb4fa183088d0361e2492780e303e2965c5ecae1 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 2 Jul 2020 13:50:24 +0200 Subject: [PATCH] Unset DISPLAY when wlr_xwayland fails Avoids having applications connect to a leftover DISPLAY when Xwayland fails to initialize. --- sway/server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sway/server.c b/sway/server.c index c036396f3..ff848450d 100644 --- a/sway/server.c +++ b/sway/server.c @@ -202,6 +202,7 @@ bool server_start(struct sway_server *server) { config->xwayland == XWAYLAND_MODE_LAZY); if (!server->xwayland.wlr_xwayland) { sway_log(SWAY_ERROR, "Failed to start Xwayland"); + unsetenv("DISPLAY"); } else { wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, &server->xwayland_surface);