animations: Fix incorrect animation when manually moving a window when its being created (#5141)

* fix incorrect rendering when manually moving a window when its being created

* add setAnimationsToMove
This commit is contained in:
thejch
2024-03-18 19:52:52 -07:00
committed by GitHub
parent 7a31c954e5
commit e6532ba024
5 changed files with 22 additions and 0 deletions

View File

@@ -970,6 +970,8 @@ void CHyprMasterLayout::moveWindowTo(CWindow* pWindow, const std::string& dir) {
const auto PWINDOW2 = g_pCompositor->getWindowInDirection(pWindow, dir[0]);
pWindow->setAnimationsToMove();
if (pWindow->m_iWorkspaceID != PWINDOW2->m_iWorkspaceID) {
// if different monitors, send to monitor
onWindowRemovedTiling(pWindow);
@@ -1002,6 +1004,9 @@ void CHyprMasterLayout::switchWindows(CWindow* pWindow, CWindow* pWindow2) {
PNODE->pWindow = pWindow2;
PNODE2->pWindow = pWindow;
pWindow->setAnimationsToMove();
pWindow2->setAnimationsToMove();
recalculateMonitor(pWindow->m_iMonitorID);
if (PNODE2->workspaceID != PNODE->workspaceID)
recalculateMonitor(pWindow2->m_iMonitorID);