reenderer: Add 1 border damage to fix number rounding issues (#5343)

* add 1 to border damage to avoid rounding issues

* add 1 to rounding too
This commit is contained in:
thejch 2024-03-31 06:59:22 -07:00 committed by GitHub
parent 16a9c16d9f
commit e1e41e5448
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,8 +92,8 @@ void CHyprBorderDecoration::damageEntire() {
auto surfaceBox = m_pWindow->getWindowMainSurfaceBox(); auto surfaceBox = m_pWindow->getWindowMainSurfaceBox();
const auto ROUNDING = m_pWindow->rounding(); const auto ROUNDING = m_pWindow->rounding();
const auto ROUNDINGSIZE = ROUNDING - M_SQRT1_2 * ROUNDING + 1; const auto ROUNDINGSIZE = ROUNDING - M_SQRT1_2 * ROUNDING + 2;
const auto BORDERSIZE = m_pWindow->getRealBorderSize(); const auto BORDERSIZE = m_pWindow->getRealBorderSize() + 1;
const auto PWINDOWWORKSPACE = g_pCompositor->getWorkspaceByID(m_pWindow->m_iWorkspaceID); const auto PWINDOWWORKSPACE = g_pCompositor->getWorkspaceByID(m_pWindow->m_iWorkspaceID);
if (PWINDOWWORKSPACE && PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() && !m_pWindow->m_bPinned) if (PWINDOWWORKSPACE && PWINDOWWORKSPACE->m_vRenderOffset.isBeingAnimated() && !m_pWindow->m_bPinned)