aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-07-04 09:21:10 +0100
committerGitHub <noreply@github.com>2018-07-04 09:21:10 +0100
commit39534a1a614e911d4725a37b35208e4f347b6564 (patch)
tree55272d0cb9f32a18b671b049336841024c10c0fa
parent8cc26130a66f533a5cbb8e4833a536dd8798f833 (diff)
parentc092f1fe6a742bc79015efe6e485c35f49cbf473 (diff)
Merge pull request #2201 from martinetd/setenv-wl-display
startup: move setenv WAYLAND_DISPLAY before config execs
-rw-r--r--sway/main.c1
-rw-r--r--sway/server.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/sway/main.c b/sway/main.c
index 124f9fbb..8b0b8612 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -416,6 +416,7 @@ int main(int argc, char **argv) {
security_sanity_check();
config->active = true;
+ setenv("WAYLAND_DISPLAY", server.socket, true);
// Execute commands until there are none left
while (config->cmd_queue->length) {
char *line = config->cmd_queue->items[0];
diff --git a/sway/server.c b/sway/server.c
index 8106f3c8..cd15f454 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -143,7 +143,6 @@ void server_fini(struct sway_server *server) {
void server_run(struct sway_server *server) {
wlr_log(L_INFO, "Running compositor on wayland display '%s'",
server->socket);
- setenv("WAYLAND_DISPLAY", server->socket, true);
if (!wlr_backend_start(server->backend)) {
wlr_log(L_ERROR, "Failed to start backend");
wlr_backend_destroy(server->backend);