diff options
Diffstat (limited to 'src/Window.cpp')
| -rw-r--r-- | src/Window.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Window.cpp b/src/Window.cpp index 549133d5..e06c3d3a 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -88,6 +88,22 @@ wlr_box CWindow::getWindowIdealBoundingBoxIgnoreReserved() { return wlr_box{(int)POS.x, (int)POS.y, (int)SIZE.x, (int)SIZE.y}; } +SWindowDecorationExtents CWindow::getFullWindowReservedArea() { + SWindowDecorationExtents extents; + + for (auto& wd : m_dWindowDecorations) { + const auto RESERVED = wd->getWindowDecorationReservedArea(); + + if (RESERVED.bottomRight == Vector2D{} && RESERVED.topLeft == Vector2D{}) + continue; + + extents.topLeft = extents.topLeft + RESERVED.topLeft; + extents.bottomRight = extents.bottomRight + RESERVED.bottomRight; + } + + return extents; +} + void CWindow::updateWindowDecos() { for (auto& wd : m_dWindowDecorations) wd->updateWindow(this); |
