summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-12-11 16:46:20 +0000
committerVaxry <vaxry@vaxry.net>2023-12-11 16:46:20 +0000
commit8191e635a33ea634846f6458b42685da277f50b5 (patch)
tree50b680ddc3b18331a3e6eee810657671a447f582 /src/render
parent0fdf909b196ffb5730bcf52c1195eabeb2b04d3c (diff)
deco-positioner: include sticky in sent geometry
Diffstat (limited to 'src/render')
-rw-r--r--src/render/decorations/DecorationPositioner.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/render/decorations/DecorationPositioner.cpp b/src/render/decorations/DecorationPositioner.cpp
index 30e49ac1..bdf37e58 100644
--- a/src/render/decorations/DecorationPositioner.cpp
+++ b/src/render/decorations/DecorationPositioner.cpp
@@ -227,28 +227,28 @@ void CDecorationPositioner::onWindowUpdate(CWindow* pWindow) {
stickyOffsetYT += desiredSize;
stickyOffsetYB += desiredSize;
} else if (LEFT) {
- pos = wb.pos() - EDGEPOINT - Vector2D{stickyOffsetXL, 0};
+ pos = wb.pos() - EDGEPOINT - Vector2D{stickyOffsetXL, -stickyOffsetYT};
pos.x -= desiredSize;
- size = {desiredSize, wb.size().y};
+ size = {desiredSize, wb.size().y + stickyOffsetYB + stickyOffsetYT};
if (SOLID)
stickyOffsetXL += desiredSize;
} else if (RIGHT) {
- pos = wb.pos() + Vector2D{wb.size().x, 0} - EDGEPOINT + Vector2D{stickyOffsetXR, 0};
- size = {desiredSize, wb.size().y};
+ pos = wb.pos() + Vector2D{wb.size().x, 0} - EDGEPOINT + Vector2D{stickyOffsetXR, -stickyOffsetYT};
+ size = {desiredSize, wb.size().y + stickyOffsetYB + stickyOffsetYT};
if (SOLID)
stickyOffsetXR += desiredSize;
} else if (TOP) {
- pos = wb.pos() - EDGEPOINT - Vector2D{0, stickyOffsetYT};
+ pos = wb.pos() - EDGEPOINT - Vector2D{stickyOffsetXL, stickyOffsetYT};
pos.y -= desiredSize;
- size = {wb.size().x, desiredSize};
+ size = {wb.size().x + stickyOffsetXL + stickyOffsetXR, desiredSize};
if (SOLID)
stickyOffsetYT += desiredSize;
} else {
- pos = wb.pos() + Vector2D{0, wb.size().y} - EDGEPOINT - Vector2D{0, stickyOffsetYB};
- size = {wb.size().x, desiredSize};
+ pos = wb.pos() + Vector2D{0, wb.size().y} - EDGEPOINT - Vector2D{stickyOffsetXL, stickyOffsetYB};
+ size = {wb.size().x + stickyOffsetXL + stickyOffsetXR, desiredSize};
if (SOLID)
stickyOffsetYB += desiredSize;