From 5ce7c71cef76155c9b286aeff2403f83e356dfce Mon Sep 17 00:00:00 2001 From: Scott Barron Date: Sat, 6 Aug 2022 15:36:28 -0400 Subject: [PATCH] use empty json object when no activewindow --- src/debug/HyprCtl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 5e28b96e..c0d0463b 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -157,7 +157,7 @@ std::string activeWindowRequest(HyprCtl::eHyprCtlOutputFormat format) { const auto PWINDOW = g_pCompositor->m_pLastWindow; if (!g_pCompositor->windowValidMapped(PWINDOW)) - return "Invalid"; + return format == HyprCtl::FORMAT_JSON ? "{}" : "Invalid"; if (format == HyprCtl::FORMAT_JSON) { return getFormat(