aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-07-02 13:50:24 +0200
committerTudor Brindus <me@tbrindus.ca>2020-07-02 23:55:56 -0400
commiteb4fa183088d0361e2492780e303e2965c5ecae1 (patch)
treee0279772aad737481c2e73d6b0f0b07f43c73d96
parentdfccd2a4c483a6ff03350cd4ac5e3fada1f40f2e (diff)
Unset DISPLAY when wlr_xwayland fails
Avoids having applications connect to a leftover DISPLAY when Xwayland fails to initialize.
-rw-r--r--sway/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sway/server.c b/sway/server.c
index c036396f..ff848450 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);