From 55b4f84fea33adee3ec4b0a69c2bca6e7a1f5754 Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 4 Nov 2023 17:03:05 +0000 Subject: Internal: Hyprland box implementation (#3755) * box impl * remove unused operators * missed applyfromwlr --- src/managers/AnimationManager.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/managers/AnimationManager.cpp') diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index a7d05030..1dc8e2c6 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -81,7 +81,7 @@ void CAnimationManager::tick() { CMonitor* PMONITOR = nullptr; bool animationsDisabled = animGlobalDisabled; - wlr_box WLRBOXPREV = {0, 0, 0, 0}; + CBox WLRBOXPREV = {0, 0, 0, 0}; if (PWINDOW) { WLRBOXPREV = PWINDOW->getFullWindowBoundingBox(); PMONITOR = g_pCompositor->getMonitorFromID(PWINDOW->m_iMonitorID); @@ -236,7 +236,7 @@ void CAnimationManager::tick() { BORDERSIZE + ROUNDINGSIZE); // bottom // damage for new box - const wlr_box WLRBOXNEW = {PWINDOW->m_vRealPosition.vec().x, PWINDOW->m_vRealPosition.vec().y, PWINDOW->m_vRealSize.vec().x, PWINDOW->m_vRealSize.vec().y}; + const CBox WLRBOXNEW = {PWINDOW->m_vRealPosition.vec().x, PWINDOW->m_vRealPosition.vec().y, PWINDOW->m_vRealSize.vec().x, PWINDOW->m_vRealSize.vec().y}; g_pHyprRenderer->damageBox(WLRBOXNEW.x - BORDERSIZE, WLRBOXNEW.y - BORDERSIZE, WLRBOXNEW.width + 2 * BORDERSIZE, BORDERSIZE + ROUNDINGSIZE); // top g_pHyprRenderer->damageBox(WLRBOXNEW.x - BORDERSIZE, WLRBOXNEW.y - BORDERSIZE, BORDERSIZE + ROUNDINGSIZE, WLRBOXNEW.height + 2 * BORDERSIZE); // left g_pHyprRenderer->damageBox(WLRBOXNEW.x + WLRBOXNEW.width - ROUNDINGSIZE, WLRBOXNEW.y - BORDERSIZE, BORDERSIZE + ROUNDINGSIZE, @@ -255,9 +255,8 @@ void CAnimationManager::tick() { if (PDECO) { const auto EXTENTS = PDECO->getWindowDecorationExtents(); - wlr_box dmg = {PWINDOW->m_vRealPosition.vec().x - EXTENTS.topLeft.x, PWINDOW->m_vRealPosition.vec().y - EXTENTS.topLeft.y, - PWINDOW->m_vRealSize.vec().x + EXTENTS.topLeft.x + EXTENTS.bottomRight.x, - PWINDOW->m_vRealSize.vec().y + EXTENTS.topLeft.y + EXTENTS.bottomRight.y}; + CBox dmg = {PWINDOW->m_vRealPosition.vec().x - EXTENTS.topLeft.x, PWINDOW->m_vRealPosition.vec().y - EXTENTS.topLeft.y, + PWINDOW->m_vRealSize.vec().x + EXTENTS.topLeft.x + EXTENTS.bottomRight.x, PWINDOW->m_vRealSize.vec().y + EXTENTS.topLeft.y + EXTENTS.bottomRight.y}; if (!*PSHADOWIGNOREWINDOW) { // easy, damage the entire box -- cgit v1.2.3