From 989ee6473fa3aa8fc050dece6f3019729d417176 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Mon, 9 Jan 2023 21:26:07 +0100 Subject: [PATCH] describe layers in hyprctl layers --- src/debug/HyprCtl.cpp | 5 +++-- src/main.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 4d51a796..f47c44f4 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -283,9 +283,10 @@ std::string layersRequest(HyprCtl::eHyprCtlOutputFormat format) { } else { for (auto& mon : g_pCompositor->m_vMonitors) { result += getFormat("Monitor %s:\n", mon->szName.c_str()); - int layerLevel = 0; + int layerLevel = 0; + static const std::array levelNames = {"background", "bottom", "top", "overlay"}; for (auto& level : mon->m_aLayerSurfaceLists) { - result += getFormat("\tLayer level %i:\n", layerLevel); + result += getFormat("\tLayer level %i (%s):\n", layerLevel, levelNames[layerLevel].c_str()); for (auto& layer : level) { result += getFormat("\t\tLayer %x: xywh: %i %i %i %i, namespace: %s\n", layer.get(), layer->geometry.x, layer->geometry.y, layer->geometry.width, diff --git a/src/main.cpp b/src/main.cpp index 7d1353ba..7705f613 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,7 +72,7 @@ int main(int argc, char** argv) { #ifdef USES_SYSTEMD // tell systemd it destroy bound/related units if (sd_booted() > 0) - sd_notify(0, "STOPPING=1"); + sd_notify(0, "STOPPING=1"); #endif wl_display_destroy_clients(g_pCompositor->m_sWLDisplay);