summaryrefslogtreecommitdiff
path: root/src/desktop/view/LayerSurface.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2026-01-08 21:58:38 +0100
committerVaxry <vaxry@vaxry.net>2026-01-08 22:22:58 +0100
commit3dcaadbdf5336791f2952456f40d06f857cbedea (patch)
tree2c396738b7239d8583bc1ee305c0ca7b605d205c /src/desktop/view/LayerSurface.cpp
parenta649dbe4c4f77c75869d9a627961b426a4e16838 (diff)
desktop/ls: fix invalid clamp
Diffstat (limited to 'src/desktop/view/LayerSurface.cpp')
-rw-r--r--src/desktop/view/LayerSurface.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/desktop/view/LayerSurface.cpp b/src/desktop/view/LayerSurface.cpp
index b006c6b9..85e511e2 100644
--- a/src/desktop/view/LayerSurface.cpp
+++ b/src/desktop/view/LayerSurface.cpp
@@ -26,7 +26,7 @@ PHLLS CLayerSurface::create(SP<CLayerShellResource> resource) {
pLS->m_ruleApplicator = makeUnique<Desktop::Rule::CLayerRuleApplicator>(pLS);
pLS->m_self = pLS;
pLS->m_namespace = resource->m_layerNamespace;
- pLS->m_layer = std::clamp(resource->m_current.layer, ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY);
+ pLS->m_layer = std::clamp(resource->m_current.layer, ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY);
pLS->m_popupHead = CPopup::create(pLS);
g_pAnimationManager->createAnimation(0.f, pLS->m_alpha, g_pConfigManager->getAnimationPropertyConfig("fadeLayersIn"), pLS, AVARDAMAGE_ENTIRE);
@@ -323,7 +323,7 @@ void CLayerSurface::onCommit() {
if (m_layerSurface->m_current.committed != 0) {
if (m_layerSurface->m_current.committed & CLayerShellResource::eCommittedState::STATE_LAYER && m_layerSurface->m_current.layer != m_layer) {
- const auto NEW_LAYER = std::clamp(m_layerSurface->m_current.layer, ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY);
+ const auto NEW_LAYER = std::clamp(m_layerSurface->m_current.layer, ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND, ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY);
for (auto it = PMONITOR->m_layerSurfaceLayers[m_layer].begin(); it != PMONITOR->m_layerSurfaceLayers[m_layer].end(); it++) {
if (*it == m_self) {