diff options
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp index 9a76801c..c27e7e9e 100644 --- a/src/layout/MasterLayout.cpp +++ b/src/layout/MasterLayout.cpp @@ -879,6 +879,14 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen 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; @@ -906,14 +914,6 @@ void CHyprMasterLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscreen 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; |
