diff options
| author | Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> | 2025-01-24 18:22:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-24 19:22:05 +0100 |
| commit | 80b2fd135b45f2c2e41ceb312314908f6a3e7b30 (patch) | |
| tree | d31755b1ffdc7c91c6703149c26aeffb2f8e4247 /src | |
| parent | fda9790cde5eb2bd15c19a1e67211eabbebf9024 (diff) | |
animations: fix borderangle once (#9149)
Diffstat (limited to 'src')
| -rw-r--r-- | src/Compositor.cpp | 5 | ||||
| -rw-r--r-- | src/desktop/Window.cpp | 8 | ||||
| -rw-r--r-- | src/desktop/Window.hpp | 1 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index aeec2830..cb0665e5 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1155,6 +1155,7 @@ void CCompositor::focusWindow(PHLWINDOW pWindow, SP<CWLSurfaceResource> pSurface g_pXWaylandManager->activateWindow(pWindow, true); // sets the m_pLastWindow pWindow->updateDynamicRules(); + pWindow->onFocusAnimUpdate(); updateWindowAnimatedDecorationValues(pWindow); @@ -1851,10 +1852,6 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) { } } - // tick angle if it's not running (aka dead) - if (!pWindow->m_fBorderAngleAnimationProgress->isBeingAnimated()) - pWindow->m_fBorderAngleAnimationProgress->setValueAndWarp(0.f); - // opacity const auto PWORKSPACE = pWindow->m_pWorkspace; if (pWindow->isEffectiveInternalFSMode(FSMODE_FULLSCREEN)) { diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index fb5904be..5306bbb4 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -1274,6 +1274,14 @@ void CWindow::onWorkspaceAnimUpdate() { m_vFloatingOffset = offset; } +void CWindow::onFocusAnimUpdate() { + // borderangle once + if (m_fBorderAngleAnimationProgress->enabled() && !m_fBorderAngleAnimationProgress->isBeingAnimated()) { + m_fBorderAngleAnimationProgress->setValueAndWarp(0.f); + *m_fBorderAngleAnimationProgress = 1.f; + } +} + int CWindow::popupsCount() { if (m_bIsX11) return 0; diff --git a/src/desktop/Window.hpp b/src/desktop/Window.hpp index 5b4ad654..cff13b03 100644 --- a/src/desktop/Window.hpp +++ b/src/desktop/Window.hpp @@ -454,6 +454,7 @@ class CWindow { void switchWithWindowInGroup(PHLWINDOW pWindow); void setAnimationsToMove(); void onWorkspaceAnimUpdate(); + void onFocusAnimUpdate(); void onUpdateState(); void onUpdateMeta(); void onX11Configure(CBox box); |
