From 39303fd2b0c82358bd1a1e12a36c2b0ddd1a574e Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sun, 27 Mar 2022 20:06:44 +0200 Subject: [PATCH] animate float->tile properly --- src/layout/DwindleLayout.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index dfa93c93..507bd3cf 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -267,7 +267,14 @@ void CHyprDwindleLayout::changeWindowFloatingMode(CWindow* pWindow) { const auto PNODE = getNodeFromWindow(pWindow); if (!PNODE) { + // save real pos cuz the func applies the default 5,5 mid + const auto PSAVEDPOS = pWindow->m_vRealPosition; + const auto PSAVEDSIZE = pWindow->m_vRealSize; + onWindowCreated(pWindow); + + pWindow->m_vRealPosition = PSAVEDPOS; + pWindow->m_vRealSize = PSAVEDSIZE; } else { onWindowRemoved(pWindow); }