aboutsummaryrefslogtreecommitdiff
path: root/xwayland/xwayland.c
diff options
context:
space:
mode:
Diffstat (limited to 'xwayland/xwayland.c')
-rw-r--r--xwayland/xwayland.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index c01acb33..015c33e7 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -165,12 +165,9 @@ static void xwayland_finish_display(struct wlr_xwayland *wlr_xwayland) {
unlink_display_sockets(wlr_xwayland->display);
wlr_xwayland->display = -1;
- unsetenv("DISPLAY");
+ wlr_xwayland->display_name[0] = '\0';
}
-static bool xwayland_start_display(struct wlr_xwayland *wlr_xwayland,
- struct wl_display *wl_display);
-
static bool xwayland_start_server(struct wlr_xwayland *wlr_xwayland);
static bool xwayland_start_server_lazy(struct wlr_xwayland *wlr_xwayland);
@@ -284,10 +281,8 @@ static bool xwayland_start_display(struct wlr_xwayland *wlr_xwayland,
return false;
}
- char display_name[16];
- snprintf(display_name, sizeof(display_name), ":%d", wlr_xwayland->display);
- setenv("DISPLAY", display_name, true);
-
+ snprintf(wlr_xwayland->display_name, sizeof(wlr_xwayland->display_name),
+ ":%d", wlr_xwayland->display);
return true;
}