From b9009a7cf9f0d2df66221b0616a4c124dbfaed79 Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Thu, 14 Sep 2023 23:54:42 +0100 Subject: [PATCH] "fix" groupbar damage modified: src/render/decorations/CHyprGroupBarDecoration.cpp Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> --- src/render/decorations/CHyprGroupBarDecoration.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/render/decorations/CHyprGroupBarDecoration.cpp b/src/render/decorations/CHyprGroupBarDecoration.cpp index a2a850ef..100202b3 100644 --- a/src/render/decorations/CHyprGroupBarDecoration.cpp +++ b/src/render/decorations/CHyprGroupBarDecoration.cpp @@ -63,11 +63,13 @@ void CHyprGroupBarDecoration::updateWindow(CWindow* pWindow) { } void CHyprGroupBarDecoration::damageEntire() { - // TODO: do this properly - const int BORDERSIZE = m_pWindow->getRealBorderSize(); - auto RESERVED = getWindowDecorationExtents(); - wlr_box dm = {m_vLastWindowPos.x, m_vLastWindowPos.y + (RESERVED.topLeft.y != 0 ? -BORDERSIZE - RESERVED.topLeft.y : m_vLastWindowSize.y), m_vLastWindowSize.x + 2 * BORDERSIZE, - RESERVED.topLeft.y + RESERVED.bottomRight.y + BORDERSIZE}; + const int BORDERSIZE = m_pWindow->getRealBorderSize(); + const auto RESERVED = getWindowDecorationExtents(); + wlr_box dm = {m_vLastWindowPos.x, + m_vLastWindowPos.y + + (m_bOnTop ? -BAR_INTERNAL_PADDING - m_iBarInternalHeight - (m_bInternalBar ? 0 : BORDERSIZE) : + m_vLastWindowSize.y + BAR_INTERNAL_PADDING + (m_bInternalBar ? 0 : BORDERSIZE)), + m_vLastWindowSize.x, m_iBarInternalHeight}; g_pHyprRenderer->damageBox(&dm); }