mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 14:45:58 +01:00
xwayland: remove clearenv() call
This has been causing troubles for some of our users and only been there for legacy reasons, we trust Xwayland just as much as your next program and weston doesn't take any such care when starting it.
This commit is contained in:
parent
ef9506b0bc
commit
384642b394
1 changed files with 1 additions and 20 deletions
|
@ -1,4 +1,4 @@
|
||||||
#define _DEFAULT_SOURCE
|
#define _POSIX_C_SOURCE 200112L
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
// for SOCK_CLOEXEC
|
// for SOCK_CLOEXEC
|
||||||
#define __BSD_VISIBLE 1
|
#define __BSD_VISIBLE 1
|
||||||
|
@ -21,14 +21,6 @@
|
||||||
#include "util/signal.h"
|
#include "util/signal.h"
|
||||||
#include "xwayland/xwm.h"
|
#include "xwayland/xwm.h"
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
|
||||||
static inline int clearenv(void) {
|
|
||||||
extern char **environ;
|
|
||||||
environ[0] = NULL;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
struct wlr_xwayland_cursor {
|
struct wlr_xwayland_cursor {
|
||||||
uint8_t *pixels;
|
uint8_t *pixels;
|
||||||
uint32_t stride;
|
uint32_t stride;
|
||||||
|
@ -102,17 +94,6 @@ static void exec_xwayland(struct wlr_xwayland *wlr_xwayland) {
|
||||||
_exit(EXIT_FAILURE);
|
_exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *xdg_runtime = getenv("XDG_RUNTIME_DIR");
|
|
||||||
const char *path_var = getenv("PATH");
|
|
||||||
if (clearenv() != 0) {
|
|
||||||
wlr_log_errno(WLR_ERROR, "clearenv failed");
|
|
||||||
_exit(EXIT_FAILURE);
|
|
||||||
}
|
|
||||||
if (xdg_runtime != NULL) {
|
|
||||||
setenv("XDG_RUNTIME_DIR", xdg_runtime, true);
|
|
||||||
}
|
|
||||||
setenv("PATH", path_var, true);
|
|
||||||
|
|
||||||
char wayland_socket_str[16];
|
char wayland_socket_str[16];
|
||||||
snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", wlr_xwayland->wl_fd[1]);
|
snprintf(wayland_socket_str, sizeof(wayland_socket_str), "%d", wlr_xwayland->wl_fd[1]);
|
||||||
setenv("WAYLAND_SOCKET", wayland_socket_str, true);
|
setenv("WAYLAND_SOCKET", wayland_socket_str, true);
|
||||||
|
|
Loading…
Reference in a new issue