diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-28 19:36:36 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-02-28 19:36:36 +0000 |
| commit | 4b20d4f1add40130653b9a3f2351eb44e0e0df4b (patch) | |
| tree | dbf7a2038f30fba5fac49dd26989c005afa9c9e2 /src/Window.cpp | |
| parent | 7beb9fd606106e82554c7050aebbc5ca23dafa79 (diff) | |
Added decoration reserved area
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); |
