summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
authorthejch <66577496+thejch@users.noreply.github.com>2024-03-18 19:52:52 -0700
committerGitHub <noreply@github.com>2024-03-19 02:52:52 +0000
commite6532ba024762ba15423ae0a0935dfe4fb4196b1 (patch)
treee0b5ed767c2392da7c59783f9f8f101744356f07 /src/layout/MasterLayout.cpp
parent7a31c954e5962db07b1b83e8a7340c38e7988ab6 (diff)
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
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index 7919d50f..1c6be8d6 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -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);