expo: avoid showing old ws anim on close

This commit is contained in:
Vaxry 2024-04-03 23:37:55 +01:00
parent b93f6953ba
commit fc5c62f26a

View file

@ -334,12 +334,15 @@ void COverview::close() {
const auto NEWIDWS = g_pCompositor->getWorkspaceByID(TILE.workspaceID); const auto NEWIDWS = g_pCompositor->getWorkspaceByID(TILE.workspaceID);
const auto OLDWS = pMonitor->activeWorkspace;
if (!NEWIDWS) if (!NEWIDWS)
g_pKeybindManager->changeworkspace(std::to_string(TILE.workspaceID)); g_pKeybindManager->changeworkspace(std::to_string(TILE.workspaceID));
else else
g_pKeybindManager->changeworkspace(NEWIDWS->getConfigName()); g_pKeybindManager->changeworkspace(NEWIDWS->getConfigName());
pMonitor->activeWorkspace->startAnim(true, true, true); pMonitor->activeWorkspace->startAnim(true, true, true);
OLDWS->startAnim(false, false, true);
startedOn = pMonitor->activeWorkspace; startedOn = pMonitor->activeWorkspace;
} }