diff options
author | bvr-yr <[email protected]> | 2024-01-26 20:24:00 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-26 17:24:00 +0000 |
commit | 08e35197478d4abbd009333301e77f7da2ff53a3 (patch) | |
tree | c5d65e1798654f8e4467339ea516199dc46b07f8 /src/layout/DwindleLayout.cpp | |
parent | 5cd7e4587e0ae642ce60415f8e271df2095a3ff2 (diff) | |
download | Hyprland-08e35197478d4abbd009333301e77f7da2ff53a3.tar.gz Hyprland-08e35197478d4abbd009333301e77f7da2ff53a3.zip |
layout: save float props before setting fs state (#4537)
fixes #4388
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
-rw-r--r-- | src/layout/DwindleLayout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 76b9aeb4..0e149736 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -776,6 +776,14 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree return; } + // save position and size if floating + if (pWindow->m_bIsFloating && on) { + pWindow->m_vLastFloatingSize = pWindow->m_vRealSize.goalv(); + pWindow->m_vLastFloatingPosition = pWindow->m_vRealPosition.goalv(); + pWindow->m_vPosition = pWindow->m_vRealPosition.goalv(); + pWindow->m_vSize = pWindow->m_vRealSize.goalv(); + } + // otherwise, accept it. pWindow->m_bIsFullscreen = on; PWORKSPACE->m_bHasFullscreenWindow = !PWORKSPACE->m_bHasFullscreenWindow; @@ -803,14 +811,6 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree PWORKSPACE->m_efFullscreenMode = fullscreenMode; - // save position and size if floating - if (pWindow->m_bIsFloating) { - pWindow->m_vLastFloatingSize = pWindow->m_vRealSize.goalv(); - pWindow->m_vLastFloatingPosition = pWindow->m_vRealPosition.goalv(); - pWindow->m_vPosition = pWindow->m_vRealPosition.goalv(); - pWindow->m_vSize = pWindow->m_vRealSize.goalv(); - } - // apply new pos and size being monitors' box if (fullscreenMode == FULLSCREEN_FULL) { pWindow->m_vRealPosition = PMONITOR->vecPosition; |