From 45c3787e75323999d2f43b6f83972f4cb11a81f9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 25 Jan 2025 19:37:33 +0000 Subject: [PATCH] window: revert only set m_iMonitorMovedFrom, when moving to a different monitor This reverts commit 089fdd1ea0d991da5b068db51531f54c90a2df25. Great commit. --- src/Compositor.cpp | 1 + src/desktop/Window.cpp | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index e1ded6b6938..fa73be66b77 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1867,6 +1867,7 @@ void CCompositor::updateWindowAnimatedDecorationValues(PHLWINDOW pWindow) { } // opacity + const auto PWORKSPACE = pWindow->m_pWorkspace; if (pWindow->isEffectiveInternalFSMode(FSMODE_FULLSCREEN)) { *pWindow->m_fActiveInactiveAlpha = pWindow->m_sWindowData.alphaFullscreen.valueOrDefault().applyAlpha(*PFULLSCREENALPHA); } else { diff --git a/src/desktop/Window.cpp b/src/desktop/Window.cpp index 962386c8abf..5f84aa3a8f1 100644 --- a/src/desktop/Window.cpp +++ b/src/desktop/Window.cpp @@ -420,13 +420,12 @@ void CWindow::moveToWorkspace(PHLWORKSPACE pWorkspace) { static auto PCLOSEONLASTSPECIAL = CConfigValue("misc:close_special_on_empty"); - const auto OLDWORKSPACE = m_pWorkspace; - const bool TOANOTHERMONITOR = OLDWORKSPACE && OLDWORKSPACE->monitorID() != pWorkspace->monitorID(); + const auto OLDWORKSPACE = m_pWorkspace; m_fMovingToWorkspaceAlpha->setValueAndWarp(1.F); *m_fMovingToWorkspaceAlpha = 0.F; m_fMovingToWorkspaceAlpha->setCallbackOnEnd([this](auto) { m_iMonitorMovedFrom = -1; }); - m_iMonitorMovedFrom = TOANOTHERMONITOR ? OLDWORKSPACE->monitorID() : -1; + m_iMonitorMovedFrom = OLDWORKSPACE ? OLDWORKSPACE->monitorID() : -1; m_pWorkspace = pWorkspace;