forked from RepoMirrors/bemenu
Make renderers try detect whether they are in correct env.
This commit is contained in:
parent
bf5fd83491
commit
d8097c44dd
@ -184,6 +184,9 @@ destructor(struct bm_menu *menu)
|
||||
static bool
|
||||
constructor(struct bm_menu *menu)
|
||||
{
|
||||
if (!getenv("WAYLAND_DISPLAY") && !getenv("WAYLAND_SOCKET"))
|
||||
return false;
|
||||
|
||||
struct wayland *wayland;
|
||||
if (!(menu->renderer->internal = wayland = calloc(1, sizeof(struct wayland))))
|
||||
goto fail;
|
||||
|
@ -200,6 +200,9 @@ destructor(struct bm_menu *menu)
|
||||
static bool
|
||||
constructor(struct bm_menu *menu)
|
||||
{
|
||||
if (getenv("WAYLAND_DISPLAY") || getenv("WAYLAND_SOCKET"))
|
||||
return false;
|
||||
|
||||
struct x11 *x11;
|
||||
if (!(menu->renderer->internal = x11 = calloc(1, sizeof(struct x11))))
|
||||
goto fail;
|
||||
|
Loading…
Reference in New Issue
Block a user