mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Don't print error: XDG_RUNTIME_DIR not set in the environment. when $XDG_RUNTIME_DIR is not set
According to [the manpage](https://manpages.debian.org/experimental/libwayland-doc/wl_display_connect.3.en.html), $XDG_RUNTIME_DIR must be set before calling `wl_display_connect(NULL)`. Otherwise `wl_display_connect` will always fail, and print the error message
This commit is contained in:
@@ -442,6 +442,9 @@ static void waylandGlobalAddListener(void* data, struct wl_registry* registry, u
|
||||
|
||||
static bool printResolutionWaylandBackend(FFinstance* instance)
|
||||
{
|
||||
if(getenv("XDG_RUNTIME_DIR") == NULL)
|
||||
return false;
|
||||
|
||||
const char* sessionType = getenv("XDG_SESSION_TYPE");
|
||||
if(sessionType != NULL && strcasecmp(sessionType, "wayland") != 0)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user