Skip to content

Commit

Permalink
window: fixup fade out animation on silent moves
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 7, 2025
1 parent 308b1f3 commit 67e1e46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/desktop/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,10 @@ void CWindow::moveToWorkspace(PHLWORKSPACE pWorkspace) {

const auto OLDWORKSPACE = m_pWorkspace;

m_iMonitorMovedFrom = OLDWORKSPACE ? OLDWORKSPACE->monitorID() : -1;
m_fMovingToWorkspaceAlpha->setCallbackOnEnd([this](auto) { m_iMonitorMovedFrom = -1; });
m_fMovingToWorkspaceAlpha->setValueAndWarp(1.F);
*m_fMovingToWorkspaceAlpha = 0.F;
m_fMovingToWorkspaceAlpha->setCallbackOnEnd([this](auto) { m_iMonitorMovedFrom = -1; });
m_iMonitorMovedFrom = OLDWORKSPACE ? OLDWORKSPACE->monitorID() : -1;

m_pWorkspace = pWorkspace;

Expand Down Expand Up @@ -541,9 +541,9 @@ void CWindow::onMap() {
m_fMovingFromWorkspaceAlpha->resetAllCallbacks();

m_fMovingFromWorkspaceAlpha->setValueAndWarp(1.F);
m_fBorderAngleAnimationProgress->setCallbackOnEnd([&](WP<CBaseAnimatedVariable> p) { onBorderAngleAnimEnd(p); }, false);

m_fBorderAngleAnimationProgress->setValueAndWarp(0.f);
m_fBorderAngleAnimationProgress->setCallbackOnEnd([&](WP<CBaseAnimatedVariable> p) { onBorderAngleAnimEnd(p); }, false);
*m_fBorderAngleAnimationProgress = 1.f;

m_fMovingFromWorkspaceAlpha->setValueAndWarp(1.F);
Expand Down

0 comments on commit 67e1e46

Please sign in to comment.