diff options
| author | Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> | 2025-12-14 19:46:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-14 19:46:49 +0000 |
| commit | 7ccc57eb7cacded5e7a8835b705bba48963d3cb3 (patch) | |
| tree | 0bc87ed7beeeb19039bd3a40bf1c3febc36c851b /src/desktop/view/Window.cpp | |
| parent | e4a8f2b14f789075612bfd26e8153039c8f295f2 (diff) | |
animation: migrate PHLANIMVAR from SP to UP (#12486)
Diffstat (limited to 'src/desktop/view/Window.cpp')
| -rw-r--r-- | src/desktop/view/Window.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp index b01dcabc..2fc15566 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -639,14 +639,13 @@ void CWindow::onMap() { } void CWindow::onBorderAngleAnimEnd(WP<CBaseAnimatedVariable> pav) { - const auto PAV = pav.lock(); - if (!PAV) + if (!pav) return; - if (PAV->getStyle() != "loop" || !PAV->enabled()) + if (pav->getStyle() != "loop" || !pav->enabled()) return; - const auto PANIMVAR = dc<CAnimatedVariable<float>*>(PAV.get()); + const auto PANIMVAR = dc<CAnimatedVariable<float>*>(pav.get()); PANIMVAR->setCallbackOnEnd(nullptr); // we remove the callback here because otherwise setvalueandwarp will recurse this @@ -1912,16 +1911,14 @@ std::optional<Vector2D> CWindow::calculateExpression(const std::string& s) { } static void setVector2DAnimToMove(WP<CBaseAnimatedVariable> pav) { - const auto PAV = pav.lock(); - if (!PAV) + if (!pav) return; - CAnimatedVariable<Vector2D>* animvar = dc<CAnimatedVariable<Vector2D>*>(PAV.get()); + CAnimatedVariable<Vector2D>* animvar = dc<CAnimatedVariable<Vector2D>*>(pav.get()); animvar->setConfig(g_pConfigManager->getAnimationPropertyConfig("windowsMove")); - const auto PHLWINDOW = animvar->m_Context.pWindow.lock(); - if (PHLWINDOW) - PHLWINDOW->m_animatingIn = false; + if (animvar->m_Context.pWindow) + animvar->m_Context.pWindow->m_animatingIn = false; } void CWindow::mapWindow() { |
