From cee7f11d8b785356c598726809589b385f139dbf Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 16 Mar 2023 00:18:39 +0000 Subject: [PATCH] hyprctl: ignore null output monitors --- src/debug/HyprCtl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 0adfb897a..74dd7a154 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -20,6 +20,9 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) { result += "["; for (auto& m : g_pCompositor->m_vMonitors) { + if (!m->output) + continue; + result += getFormat( R"#({ "id": %i, @@ -58,6 +61,9 @@ std::string monitorsRequest(HyprCtl::eHyprCtlOutputFormat format) { result += "]"; } else { for (auto& m : g_pCompositor->m_vMonitors) { + if (!m->output) + continue; + result += getFormat("Monitor %s (ID %i):\n\t%ix%i@%f at %ix%i\n\tdescription: %s\n\tmake: %s\n\tmodel: %s\n\tserial: %s\n\tactive workspace: %i (%s)\n\treserved: %i " "%i %i %i\n\tscale: %.2f\n\ttransform: " "%i\n\tfocused: %s\n\tdpmsStatus: %i\n\tvrr: %i\n\n",