diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2023-11-04 17:03:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-04 17:03:05 +0000 |
| commit | 55b4f84fea33adee3ec4b0a69c2bca6e7a1f5754 (patch) | |
| tree | be7db4f841b4ac049527daae01e683701bf92b92 /src/managers/AnimationManager.cpp | |
| parent | 73e78f05ad5cafa20ac5bf177c94ac9ecca37097 (diff) | |
Internal: Hyprland box implementation (#3755)
* box impl
* remove unused operators
* missed applyfromwlr
Diffstat (limited to 'src/managers/AnimationManager.cpp')
| -rw-r--r-- | src/managers/AnimationManager.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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 |
