"fix" groupbar damage

modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

Signed-off-by: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com>
This commit is contained in:
MightyPlaza 2023-09-14 23:54:42 +01:00
parent ce3a5e5bb5
commit b9009a7cf9
No known key found for this signature in database
GPG key ID: 284C27FD27A6DC0D

View file

@ -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 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);
}