aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorvaxerski <[email protected]>2022-07-06 21:57:35 +0200
committervaxerski <[email protected]>2022-07-06 21:57:35 +0200
commit6a16f11d63cead0b8526f442c18727a6f3dc76ea (patch)
tree1993c7d56496a16ba6d3470b851a6d4bdcdb6c97
parenta545992891668d9872bed04b76d3b35b32dc0796 (diff)
downloadHyprland-6a16f11d63cead0b8526f442c18727a6f3dc76ea.tar.gz
Hyprland-6a16f11d63cead0b8526f442c18727a6f3dc76ea.zip
add namespace to hyprctl layers
-rw-r--r--src/debug/HyprCtl.cpp2
-rw-r--r--src/events/Layers.cpp5
-rw-r--r--src/helpers/WLClasses.hpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp
index 9a30c54c..41bfe06c 100644
--- a/src/debug/HyprCtl.cpp
+++ b/src/debug/HyprCtl.cpp
@@ -64,7 +64,7 @@ std::string layersRequest() {
result += getFormat("\tLayer level %i:\n", layerLevel);
for (auto& layer : level) {
- result += getFormat("\t\tLayer %x: xywh: %i %i %i %i\n", layer, layer->geometry.x, layer->geometry.y, layer->geometry.width, layer->geometry.height);
+ result += getFormat("\t\tLayer %x: xywh: %i %i %i %i, namespace: %s\n", layer, layer->geometry.x, layer->geometry.y, layer->geometry.width, layer->geometry.height, layer->szNamespace.c_str());
}
layerLevel++;
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp
index 773ba909..495dfc1b 100644
--- a/src/events/Layers.cpp
+++ b/src/events/Layers.cpp
@@ -32,8 +32,9 @@ void Events::listener_newLayerSurface(wl_listener* listener, void* data) {
}
const auto PMONITOR = (SMonitor*)g_pCompositor->getMonitorFromOutput(WLRLAYERSURFACE->output);
- PMONITOR->m_aLayerSurfaceLists[WLRLAYERSURFACE->pending.layer].push_back(new SLayerSurface());
- SLayerSurface* layerSurface = PMONITOR->m_aLayerSurfaceLists[WLRLAYERSURFACE->pending.layer].back();
+ SLayerSurface* layerSurface = PMONITOR->m_aLayerSurfaceLists[WLRLAYERSURFACE->pending.layer].emplace_back(new SLayerSurface());
+
+ layerSurface->szNamespace = WLRLAYERSURFACE->_namespace;
if (!WLRLAYERSURFACE->output) {
WLRLAYERSURFACE->output = g_pCompositor->m_vMonitors.front()->output; // TODO: current mon
diff --git a/src/helpers/WLClasses.hpp b/src/helpers/WLClasses.hpp
index d9374158..0ab4c52b 100644
--- a/src/helpers/WLClasses.hpp
+++ b/src/helpers/WLClasses.hpp
@@ -25,6 +25,8 @@ struct SLayerSurface {
int monitorID = -1;
+ std::string szNamespace = "";
+
CAnimatedVariable alpha;
bool fadingOut = false;
bool readyToDelete = false;