diff --git a/src/protocols/LayerShell.cpp b/src/protocols/LayerShell.cpp index fd66ba5e..029f261d 100644 --- a/src/protocols/LayerShell.cpp +++ b/src/protocols/LayerShell.cpp @@ -152,6 +152,8 @@ CLayerShellResource::CLayerShellResource(SP resource_, SPsetSetExclusiveEdge([this](CZwlrLayerSurfaceV1* r, zwlrLayerSurfaceV1Anchor anchor) { + // TODO: validate anchor + pending.committed |= STATE_EDGE; pending.exclusiveEdge = anchor; }); diff --git a/src/render/Renderer.cpp b/src/render/Renderer.cpp index 835fed91..d8de7ba8 100644 --- a/src/render/Renderer.cpp +++ b/src/render/Renderer.cpp @@ -1506,7 +1506,8 @@ void CHyprRenderer::setSurfaceScanoutMode(SP surface, SP 0) { + if ((exclusiveEdge == edges[i].singular_anchor || anchor == edges[i].singular_anchor || anchor == edges[i].anchor_triplet) && exclusive + edges[i].margin > 0) { if (edges[i].positive_axis) { *edges[i].positive_axis += exclusive + edges[i].margin; } @@ -1638,7 +1639,7 @@ void CHyprRenderer::arrangeLayerArray(CMonitor* pMonitor, const std::vectorgeometry = box; - applyExclusive(*usableArea, PSTATE->anchor, PSTATE->exclusive, PSTATE->margin.top, PSTATE->margin.right, PSTATE->margin.bottom, PSTATE->margin.left); + applyExclusive(*usableArea, PSTATE->anchor, PSTATE->exclusive, PSTATE->exclusiveEdge, PSTATE->margin.top, PSTATE->margin.right, PSTATE->margin.bottom, PSTATE->margin.left); if (Vector2D{box.width, box.height} != OLDSIZE) ls->layerSurface->configure(box.size());