diff options
author | Simon Ser <contact@emersion.fr> | 2020-07-02 13:50:24 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-07-15 19:27:11 +0200 |
commit | 2cc61bbbbeca81ae1961d4628d5844ce371f49e8 (patch) | |
tree | edb0fabef46f86ecda11e6e56ea9f35159c569a9 | |
parent | Don't set xwayland cursor when wlr_xwayland failed (diff) | |
download | sway-2cc61bbbbeca81ae1961d4628d5844ce371f49e8.tar.gz sway-2cc61bbbbeca81ae1961d4628d5844ce371f49e8.tar.zst sway-2cc61bbbbeca81ae1961d4628d5844ce371f49e8.zip |
Unset DISPLAY when wlr_xwayland fails
Avoids having applications connect to a leftover DISPLAY when Xwayland
fails to initialize.
(cherry picked from commit eb4fa183088d0361e2492780e303e2965c5ecae1)
-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); |