diff options
author | vaxerski <[email protected]> | 2022-08-09 18:37:50 +0200 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-08-09 18:37:50 +0200 |
commit | 862722412f4eda3f1eb166ca74f9c520c4a51c11 (patch) | |
tree | f8441e1e6ab6acbbec29c98e0ed50016ff0c9e79 | |
parent | a6d4a4d5f309da08f4629bbdc8afa891cfcb7801 (diff) | |
download | Hyprland-862722412f4eda3f1eb166ca74f9c520c4a51c11.tar.gz Hyprland-862722412f4eda3f1eb166ca74f9c520c4a51c11.zip |
handle fullscreen in dwindle groups better
-rw-r--r-- | src/layout/DwindleLayout.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 18f0d9f2..4d983f9b 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -657,6 +657,11 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) { if (!PNODE) return; // reject + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID); + + if (PWORKSPACE->m_bHasFullscreenWindow) + fullscreenRequestForWindow(g_pCompositor->getFullscreenWindowOnWorkspace(PWORKSPACE->m_iID), FULLSCREEN_FULL, false); + const auto PGROUPPARENT = PNODE->pGroupParent; if (PGROUPPARENT) { @@ -752,6 +757,8 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) { if (!PNODE->pGroupParent) return; // reject + const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID); + if (forward) PNODE->pGroupParent->groupMemberActive++; else @@ -763,6 +770,13 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) { if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size()) PNODE->pGroupParent->groupMemberActive = 0; + bool restoreFullscreen = false; + + if (PNODE->pWindow->m_bIsFullscreen) { + fullscreenRequestForWindow(PNODE->pWindow, PWORKSPACE->m_efFullscreenMode, false); + restoreFullscreen = true; + } + PNODE->pGroupParent->recalcSizePosRecursive(); for (auto& gm : PNODE->pGroupParent->groupMembers) { @@ -773,6 +787,10 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) { // focus g_pCompositor->focusWindow(PNODE->pGroupParent->groupMembers[PNODE->pGroupParent->groupMemberActive]->pWindow); + + if (restoreFullscreen) { + fullscreenRequestForWindow(PNODE->pGroupParent->groupMembers[PNODE->pGroupParent->groupMemberActive]->pWindow, PWORKSPACE->m_efFullscreenMode, true); + } } SWindowRenderLayoutHints CHyprDwindleLayout::requestRenderHints(CWindow* pWindow) { |