From de3471b3356280e692109cea81e426b7222a8aea Mon Sep 17 00:00:00 2001 From: ItsOhen Date: Fri, 13 Mar 2026 22:50:34 +0100 Subject: config/workspacerule: add animation style (#13380) --- src/managers/animation/DesktopAnimationManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/managers/animation/DesktopAnimationManager.cpp') diff --git a/src/managers/animation/DesktopAnimationManager.cpp b/src/managers/animation/DesktopAnimationManager.cpp index 2c450add..224fc52f 100644 --- a/src/managers/animation/DesktopAnimationManager.cpp +++ b/src/managers/animation/DesktopAnimationManager.cpp @@ -1,6 +1,7 @@ #include "DesktopAnimationManager.hpp" #include +#include #include "../../desktop/view/LayerSurface.hpp" #include "../../desktop/view/Window.hpp" @@ -232,7 +233,7 @@ void CDesktopAnimationManager::startAnimation(PHLLS ls, eAnimationType type, boo } } -void CDesktopAnimationManager::startAnimation(PHLWORKSPACE ws, eAnimationType type, bool left, bool instant) { +void CDesktopAnimationManager::startAnimation(PHLWORKSPACE ws, eAnimationType type, bool left, bool instant, std::optional style) { const bool IN = type == ANIMATION_TYPE_IN; if (!instant) { @@ -243,8 +244,9 @@ void CDesktopAnimationManager::startAnimation(PHLWORKSPACE ws, eAnimationType ty } static auto PWORKSPACEGAP = CConfigValue("general:gaps_workspaces"); const auto PMONITOR = ws->m_monitor.lock(); - const auto ANIMSTYLE = ws->m_alpha->getStyle(); - float movePerc = 100.f; + const auto ANIMSTYLE = style.value_or(ws->m_alpha->getStyle()); + + float movePerc = 100.f; // inverted for some reason. TODO: fix the cause bool vert = ANIMSTYLE.starts_with("slidevert") || ANIMSTYLE.starts_with("slidefadevert"); -- cgit v1.2.3