diff options
| author | ItsOhen <TNordfeldt@gmail.com> | 2026-03-13 22:50:34 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-13 16:50:34 -0500 |
| commit | de3471b3356280e692109cea81e426b7222a8aea (patch) | |
| tree | c7b454165cd9b198728958623849c32ff58634b3 /src/managers/animation/DesktopAnimationManager.cpp | |
| parent | 2877ca2933a2f6e11512479b18e5d418b3e23da3 (diff) | |
config/workspacerule: add animation style (#13380)
Diffstat (limited to 'src/managers/animation/DesktopAnimationManager.cpp')
| -rw-r--r-- | src/managers/animation/DesktopAnimationManager.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <algorithm> +#include <optional> #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<std::string> 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<Hyprlang::INT>("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"); |
