mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-08 16:11:57 -07:00
remember size and pos on fullscreen 1
This commit is contained in:
@@ -101,6 +101,7 @@ class CWindow {
|
||||
|
||||
// for restoring floating statuses
|
||||
Vector2D m_vLastFloatingSize;
|
||||
Vector2D m_vLastFloatingPosition;
|
||||
|
||||
// this is used for pseudotiling
|
||||
bool m_bIsPseudotiled = false;
|
||||
|
@@ -749,8 +749,8 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree
|
||||
applyNodeDataToWindow(PNODE);
|
||||
else {
|
||||
// get back its' dimensions from position and size
|
||||
pWindow->m_vRealPosition = pWindow->m_vPosition;
|
||||
pWindow->m_vRealSize = pWindow->m_vSize;
|
||||
pWindow->m_vRealPosition = pWindow->m_vLastFloatingPosition;
|
||||
pWindow->m_vRealSize = pWindow->m_vLastFloatingSize;
|
||||
}
|
||||
} else {
|
||||
// if it now got fullscreen, make it fullscreen
|
||||
@@ -759,8 +759,10 @@ void CHyprDwindleLayout::fullscreenRequestForWindow(CWindow* pWindow, eFullscree
|
||||
|
||||
// save position and size if floating
|
||||
if (pWindow->m_bIsFloating) {
|
||||
pWindow->m_vPosition = pWindow->m_vRealPosition.vec();
|
||||
pWindow->m_vSize = pWindow->m_vRealSize.vec();
|
||||
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
|
||||
|
Reference in New Issue
Block a user