diff options
Diffstat (limited to 'src/managers')
| -rw-r--r-- | src/managers/animation/DesktopAnimationManager.cpp | 8 | ||||
| -rw-r--r-- | src/managers/animation/DesktopAnimationManager.hpp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/managers/animation/DesktopAnimationManager.cpp b/src/managers/animation/DesktopAnimationManager.cpp index 9470ec27..9a1fc081 100644 --- a/src/managers/animation/DesktopAnimationManager.cpp +++ b/src/managers/animation/DesktopAnimationManager.cpp @@ -8,6 +8,7 @@ #include "../../config/ConfigManager.hpp" #include "../../Compositor.hpp" +#include "desktop/DesktopTypes.hpp" #include "wlr-layer-shell-unstable-v1.hpp" void CDesktopAnimationManager::startAnimation(PHLWINDOW pWindow, eAnimationType type, bool force) { @@ -484,6 +485,13 @@ void CDesktopAnimationManager::setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnim } } +void CDesktopAnimationManager::setFullscreenFloatingFade(PHLWINDOW pWindow, float fade) { + if (pWindow->m_fadingOut || !pWindow->m_isFloating) + return; + + *pWindow->m_alpha = fade; +} + void CDesktopAnimationManager::overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude) { for (auto const& w : g_pCompositor->m_windows) { if (w == exclude) diff --git a/src/managers/animation/DesktopAnimationManager.hpp b/src/managers/animation/DesktopAnimationManager.hpp index f27f09d2..fa86425e 100644 --- a/src/managers/animation/DesktopAnimationManager.hpp +++ b/src/managers/animation/DesktopAnimationManager.hpp @@ -16,6 +16,7 @@ class CDesktopAnimationManager { void startAnimation(PHLWORKSPACE ws, eAnimationType type, bool left = true, bool instant = false); void setFullscreenFadeAnimation(PHLWORKSPACE ws, eAnimationType type); + void setFullscreenFloatingFade(PHLWINDOW pWindow, float fade); void overrideFullscreenFadeAmount(PHLWORKSPACE ws, float fade, PHLWINDOW exclude = nullptr); private: |
