diff options
author | emersion <contact@emersion.fr> | 2019-03-02 15:14:23 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-03-04 12:54:06 -0700 |
commit | 9601019192a411aca889db48e6dc6c856d1e2a64 (patch) | |
tree | 0fbbefba42a0590496d429ae3b6313bcdab7c459 /xwayland | |
parent | fb106eb97925d16ed6744481a9798d068a6f6690 (diff) |
xwayland: don't set DISPLAY
Let the compositor set it. This allows for multiple Xwayland instances to run
at the same time.
Fixes https://github.com/swaywm/wlroots/issues/1442
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/xwayland.c | 11 |
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; } |