diff options
author | Vaxry <[email protected]> | 2024-08-24 20:53:27 +0200 |
---|---|---|
committer | Vaxry <[email protected]> | 2024-08-24 20:53:27 +0200 |
commit | 276652b44e43a441381f51644f21ed901dab6c8f (patch) | |
tree | 4780d1dc38711da754388557f69b402d9939c25d | |
parent | 746f80456840fbaeb056edbbbd233377b6cf1c9d (diff) | |
download | Hyprland-276652b44e43a441381f51644f21ed901dab6c8f.tar.gz Hyprland-276652b44e43a441381f51644f21ed901dab6c8f.zip |
fix pure fade
-rw-r--r-- | src/desktop/Workspace.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 6b1e23b8..735da9f7 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -164,11 +164,14 @@ void CWorkspace::startAnim(bool in, bool left, bool instant) { m_fScaleClients.setValueAndWarp(1.F); - if (in) { - m_vRenderOffset.setValueAndWarp(Vector2D(left ? XDISTANCE : -XDISTANCE, 0.0)); - m_vRenderOffset = Vector2D(0, 0); - } else - m_vRenderOffset = Vector2D(left ? -XDISTANCE : XDISTANCE, 0.0); + // special case: fade enabled but this anim is disabled, so don't change anything. Only do the anim otherwise. + if (m_vRenderOffset.m_pConfig->pValues->internalEnabled || !m_fAlpha.m_pConfig->pValues->internalEnabled) { + if (in) { + m_vRenderOffset.setValueAndWarp(Vector2D(left ? XDISTANCE : -XDISTANCE, 0.0)); + m_vRenderOffset = Vector2D(0, 0); + } else + m_vRenderOffset = Vector2D(left ? -XDISTANCE : XDISTANCE, 0.0); + } } if (instant) { |