core: move parts of the animation system to hyprutils (#8868)

* core: change animation manager to use Hyprutils::Animation

* config: move animation config to hyprutils animation tree

* use g_pAnimationManager->createAnimation and the new PHLANIMVAR template

* core: use CGenericAnimatedVariabled::{enabled,setConfig,getStyle} and adapt callbacks

* core: adapt animated variable usage (dereference the shared pointer)

* misc: bump CMakeLists to hyprutils 0.3.3
This commit is contained in:
Maximilian Seidler 2025-01-07 17:55:14 +00:00 committed by GitHub
parent c7086f936a
commit 5642ed331d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
44 changed files with 1031 additions and 1664 deletions

View file

@ -124,7 +124,7 @@ void CDecorationPositioner::onWindowUpdate(PHLWINDOW pWindow) {
datas.push_back(getDataFor(wd.get(), pWindow));
}
if (WINDOWDATA->lastWindowSize == pWindow->m_vRealSize.value() /* position not changed */
if (WINDOWDATA->lastWindowSize == pWindow->m_vRealSize->value() /* position not changed */
&& std::all_of(m_vWindowPositioningDatas.begin(), m_vWindowPositioningDatas.end(),
[pWindow](const auto& data) { return pWindow != data->pWindow.lock() || !data->needsReposition; })
/* all window datas are either not for this window or don't need a reposition */
@ -132,9 +132,9 @@ void CDecorationPositioner::onWindowUpdate(PHLWINDOW pWindow) {
)
return;
WINDOWDATA->lastWindowSize = pWindow->m_vRealSize.value();
WINDOWDATA->lastWindowSize = pWindow->m_vRealSize->value();
WINDOWDATA->needsRecalc = false;
const bool EPHEMERAL = pWindow->m_vRealSize.isBeingAnimated();
const bool EPHEMERAL = pWindow->m_vRealSize->isBeingAnimated();
std::sort(datas.begin(), datas.end(), [](const auto& a, const auto& b) { return a->positioningInfo.priority > b->positioningInfo.priority; });