From e84267085d2595b2d88da6267c064ae9139c7219 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:36:18 +0000 Subject: [PATCH] animation: allow adding vars during ::tick (#644) --- src/core/AnimationManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/AnimationManager.cpp b/src/core/AnimationManager.cpp index c151427..4203015 100644 --- a/src/core/AnimationManager.cpp +++ b/src/core/AnimationManager.cpp @@ -77,8 +77,8 @@ void updateGradientVariable(CAnimatedVariable& av, const flo void CHyprlockAnimationManager::tick() { static auto* const PANIMATIONSENABLED = (Hyprlang::INT* const*)g_pConfigManager->getValuePtr("animations:enabled"); - for (auto const& av : m_vActiveAnimatedVariables) { - const auto PAV = av.lock(); + for (size_t i = 0; i < m_vActiveAnimatedVariables.size(); i++) { + const auto PAV = m_vActiveAnimatedVariables[i].lock(); if (!PAV || !PAV->ok()) continue; @@ -111,7 +111,7 @@ void CHyprlockAnimationManager::tick() { default: continue; } - av->onUpdate(); + PAV->onUpdate(); } tickDone();