diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2023-07-03 10:49:56 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-03 12:49:56 +0200 |
| commit | 05047f60f4a6303a26f5ecef712f249b770f27b9 (patch) | |
| tree | 10cca6c3f8f095be53d162ddafa64d0401530026 /src/render | |
| parent | 738ec900f4d5c5e2b00f90e71221ca380555b874 (diff) | |
groupbar fixes (#2630)
Fixes multiple groupbar decoration issues:
- togglegroup removes fullscreen to avoid to avoid weird state
- fixes issue where a group had multiple windows with head = true
- fixes issue where merging 2 groups would cause a window to have 2 groupbar decorations
- fixes issue where merging a group with more than 1 window into another group would make windows have no groupbar decoration
- fixes issue where ungrouping windows could just move them into another group on the same workspace
---------
Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/decorations/CHyprGroupBarDecoration.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index 71243f2d..9a544023 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -42,7 +42,7 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) { // we draw 3px above the window's border with 3px static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue; - m_seExtents.topLeft = Vector2D(0, *PBORDERSIZE + BAR_PADDING_OUTER_VERT * 2 + BAR_INDICATOR_HEIGHT + (*PRENDERTITLES ? *PTITLEFONTSIZE : 0)); + m_seExtents.topLeft = Vector2D(0, *PBORDERSIZE + BAR_PADDING_OUTER_VERT * 2 + BAR_INDICATOR_HEIGHT + (*PRENDERTITLES ? *PTITLEFONTSIZE : 0) + 2); m_seExtents.bottomRight = Vector2D(); m_vLastWindowPos = pWindow->m_vRealPosition.vec() + WORKSPACEOFFSET; @@ -80,9 +80,8 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) { } void CHyprGroupBarDecoration::damageEntire() { - const auto EXTENTS = getWindowDecorationReservedArea(); - wlr_box dm = {m_vLastWindowPos.x - m_seExtents.topLeft.x + EXTENTS.topLeft.x, m_vLastWindowPos.y - m_seExtents.topLeft.y + EXTENTS.topLeft.y - 2, - m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x, m_seExtents.topLeft.y}; + wlr_box dm = {m_vLastWindowPos.x - m_seExtents.topLeft.x, m_vLastWindowPos.y - m_seExtents.topLeft.y, m_vLastWindowSize.x + m_seExtents.topLeft.x + m_seExtents.bottomRight.x, + m_seExtents.topLeft.y}; g_pHyprRenderer->damageBox(&dm); } |
