Merge pull request #2201 from martinetd/setenv-wl-display

startup: move setenv WAYLAND_DISPLAY before config execs
This commit is contained in:
emersion 2018-07-04 09:21:10 +01:00 committed by GitHub
commit 39534a1a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 1 deletions

View file

@ -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];

View file

@ -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);