diff options
| author | Vaxry <vaxry@vaxry.net> | 2023-11-12 22:40:21 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2023-11-12 22:40:21 +0000 |
| commit | 45e86d4fdf425452a39010de582081c466657045 (patch) | |
| tree | bb9278554b015a4240b4062904bb3121cef43183 /src/render | |
| parent | 0ba2e6870478bcf1af1b6508677b46a3484fb21f (diff) | |
groupbar: translate box by workspace offset
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 625888da..8f134c49 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -405,5 +405,13 @@ uint64_t CHyprGroupBarDecoration::getDecorationFlags() { CBox CHyprGroupBarDecoration::assignedBoxGlobal() { CBox box = m_bAssignedBox; - return box.translate(g_pDecorationPositioner->getEdgeDefinedPoint(DECORATION_EDGE_TOP, m_pWindow)); + box.translate(g_pDecorationPositioner->getEdgeDefinedPoint(DECORATION_EDGE_TOP, m_pWindow)); + + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_pWindow->m_iWorkspaceID); + + if (!PWORKSPACE) + return box; + + const auto WORKSPACEOFFSET = PWORKSPACE && !m_pWindow->m_bPinned ? PWORKSPACE->m_vRenderOffset.vec() : Vector2D(); + return box.translate(WORKSPACEOFFSET); }
\ No newline at end of file |
