From a0a31b4f64384c980b04216c806726da5b45f5cc Mon Sep 17 00:00:00 2001 From: flightlessmango Date: Thu, 2 May 2024 17:36:07 +0200 Subject: [PATCH] x11: check that DISPLAY env exists --- src/shared_x11.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shared_x11.cpp b/src/shared_x11.cpp index 56b9a7c..2122310 100644 --- a/src/shared_x11.cpp +++ b/src/shared_x11.cpp @@ -35,8 +35,11 @@ bool init_x11() { } failed = !display; - if (failed) + if (failed && displayid) SPDLOG_ERROR("XOpenDisplay failed to open display '{}'", displayid); + + if (!displayid) + SPDLOG_DEBUG("DISPLAY env is not set"); return !!display; }