summaryrefslogtreecommitdiff
path: root/src/layout/IHyprLayout.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-09 22:01:53 +0000
committervaxerski <43317083+vaxerski@users.noreply.github.com>2022-11-09 22:02:02 +0000
commit7ff1fd9d6943ac6877da0523a95753ff9abb3cbd (patch)
tree228c5b7ee0ca519a8b58b63339457c5f805fc5b2 /src/layout/IHyprLayout.cpp
parentd0b3cdc835f8170feee8a18a64178496a852d6ae (diff)
use goal values in changeWindowFloatingMode
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
-rw-r--r--src/layout/IHyprLayout.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp
index fa697bea..8964e235 100644
--- a/src/layout/IHyprLayout.cpp
+++ b/src/layout/IHyprLayout.cpp
@@ -299,11 +299,11 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) {
pWindow->moveToWorkspace(PNEWMON->activeWorkspace);
// save real pos cuz the func applies the default 5,5 mid
- const auto PSAVEDPOS = pWindow->m_vRealPosition.vec();
- const auto PSAVEDSIZE = pWindow->m_vRealSize.vec();
+ const auto PSAVEDPOS = pWindow->m_vRealPosition.goalv();
+ const auto PSAVEDSIZE = pWindow->m_vRealSize.goalv();
// if the window is pseudo, update its size
- pWindow->m_vPseudoSize = pWindow->m_vRealSize.vec();
+ pWindow->m_vPseudoSize = pWindow->m_vRealSize.goalv();
pWindow->m_vLastFloatingSize = PSAVEDSIZE;
@@ -321,16 +321,16 @@ void IHyprLayout::changeWindowFloatingMode(CWindow* pWindow) {
if (pWindow == g_pCompositor->m_pLastWindow)
m_pLastTiledWindow = pWindow;
} else {
- pWindow->m_vSize = pWindow->m_vRealSize.vec();
- pWindow->m_vPosition = pWindow->m_vRealPosition.vec();
-
onWindowRemovedTiling(pWindow);
g_pCompositor->moveWindowToTop(pWindow);
- pWindow->m_vRealPosition = pWindow->m_vRealPosition.vec() + (pWindow->m_vRealSize.vec() - pWindow->m_vLastFloatingSize) / 2.f;
+ pWindow->m_vRealPosition = pWindow->m_vRealPosition.goalv() + (pWindow->m_vRealSize.goalv() - pWindow->m_vLastFloatingSize) / 2.f;
pWindow->m_vRealSize = pWindow->m_vLastFloatingSize;
+ pWindow->m_vSize = pWindow->m_vRealSize.goalv();
+ pWindow->m_vPosition = pWindow->m_vRealPosition.goalv();
+
g_pHyprRenderer->damageMonitor(g_pCompositor->getMonitorFromID(pWindow->m_iMonitorID));
pWindow->m_sSpecialRenderData.rounding = true;