summaryrefslogtreecommitdiff
path: root/src/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/debug')
-rw-r--r--src/debug/HyprCtl.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index df9d5f33..265d1aed 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -182,7 +182,13 @@ std::string activeWindowRequest(HyprCtl::eHyprCtlOutputFormat format) {
if (!g_pCompositor->windowValidMapped(PWINDOW))
return format == HyprCtl::FORMAT_JSON ? "{}" : "Invalid";
- return getWindowData(PWINDOW, format);
+
+ auto result = getWindowData(PWINDOW, format);
+
+ if (format == HyprCtl::FORMAT_JSON)
+ result.pop_back();
+
+ return result;
}
std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) {