diff options
author | Simon Ser <contact@emersion.fr> | 2020-07-02 13:50:24 +0200 |
---|---|---|
committer | Tudor Brindus <me@tbrindus.ca> | 2020-07-02 23:55:56 -0400 |
commit | eb4fa183088d0361e2492780e303e2965c5ecae1 (patch) | |
tree | e0279772aad737481c2e73d6b0f0b07f43c73d96 | |
parent | Don't set xwayland cursor when wlr_xwayland failed (diff) | |
download | sway-eb4fa183088d0361e2492780e303e2965c5ecae1.tar.gz sway-eb4fa183088d0361e2492780e303e2965c5ecae1.tar.zst sway-eb4fa183088d0361e2492780e303e2965c5ecae1.zip |
Unset DISPLAY when wlr_xwayland fails
Avoids having applications connect to a leftover DISPLAY when Xwayland
fails to initialize.
-rw-r--r-- | sway/server.c | 1 |
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) { | |||
202 | config->xwayland == XWAYLAND_MODE_LAZY); | 202 | config->xwayland == XWAYLAND_MODE_LAZY); |
203 | if (!server->xwayland.wlr_xwayland) { | 203 | if (!server->xwayland.wlr_xwayland) { |
204 | sway_log(SWAY_ERROR, "Failed to start Xwayland"); | 204 | sway_log(SWAY_ERROR, "Failed to start Xwayland"); |
205 | unsetenv("DISPLAY"); | ||
205 | } else { | 206 | } else { |
206 | wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, | 207 | wl_signal_add(&server->xwayland.wlr_xwayland->events.new_surface, |
207 | &server->xwayland_surface); | 208 | &server->xwayland_surface); |