From 276652b44e43a441381f51644f21ed901dab6c8f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 24 Aug 2024 20:53:27 +0200 Subject: [PATCH] fix pure fade --- src/desktop/Workspace.cpp | 13 ++++++++----- 1 file 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) {