From 9e4f90aedf2f51d3e7f3dbe5391cb193aa0bddf5 Mon Sep 17 00:00:00 2001 From: Maximilian Seidler <78690852+PaideiaDilemma@users.noreply.github.com> Date: Sat, 11 Jan 2025 16:35:57 +0000 Subject: [PATCH] animation: fixup adding animvars during ::tick (#9030) --- src/managers/AnimationManager.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/managers/AnimationManager.cpp b/src/managers/AnimationManager.cpp index ea74ffd2..28adc330 100644 --- a/src/managers/AnimationManager.cpp +++ b/src/managers/AnimationManager.cpp @@ -216,11 +216,8 @@ void CHyprAnimationManager::tick() { static auto PANIMENABLED = CConfigValue("animations:enabled"); - // We need to do this because it's perfectly valid to add/change a var during this (via callbacks) - // FIXME: instead of doing this, make a fn to defer adding until tick is done and not in progress anymore. - const auto PAVS = m_vActiveAnimatedVariables; - for (auto const& pav : PAVS) { - const auto PAV = pav.lock(); + for (size_t i = 0; i < m_vActiveAnimatedVariables.size(); i++) { + const auto PAV = m_vActiveAnimatedVariables[i].lock(); if (!PAV) continue;