mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-30 05:05:59 +01:00
handle fullscreen in dwindle groups better
This commit is contained in:
parent
a6d4a4d5f3
commit
862722412f
1 changed files with 18 additions and 0 deletions
|
@ -657,6 +657,11 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) {
|
||||||
if (!PNODE)
|
if (!PNODE)
|
||||||
return; // reject
|
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;
|
const auto PGROUPPARENT = PNODE->pGroupParent;
|
||||||
|
|
||||||
if (PGROUPPARENT) {
|
if (PGROUPPARENT) {
|
||||||
|
@ -752,6 +757,8 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) {
|
||||||
if (!PNODE->pGroupParent)
|
if (!PNODE->pGroupParent)
|
||||||
return; // reject
|
return; // reject
|
||||||
|
|
||||||
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID);
|
||||||
|
|
||||||
if (forward)
|
if (forward)
|
||||||
PNODE->pGroupParent->groupMemberActive++;
|
PNODE->pGroupParent->groupMemberActive++;
|
||||||
else
|
else
|
||||||
|
@ -763,6 +770,13 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) {
|
||||||
if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size())
|
if ((long unsigned int)PNODE->pGroupParent->groupMemberActive >= PNODE->pGroupParent->groupMembers.size())
|
||||||
PNODE->pGroupParent->groupMemberActive = 0;
|
PNODE->pGroupParent->groupMemberActive = 0;
|
||||||
|
|
||||||
|
bool restoreFullscreen = false;
|
||||||
|
|
||||||
|
if (PNODE->pWindow->m_bIsFullscreen) {
|
||||||
|
fullscreenRequestForWindow(PNODE->pWindow, PWORKSPACE->m_efFullscreenMode, false);
|
||||||
|
restoreFullscreen = true;
|
||||||
|
}
|
||||||
|
|
||||||
PNODE->pGroupParent->recalcSizePosRecursive();
|
PNODE->pGroupParent->recalcSizePosRecursive();
|
||||||
|
|
||||||
for (auto& gm : PNODE->pGroupParent->groupMembers) {
|
for (auto& gm : PNODE->pGroupParent->groupMembers) {
|
||||||
|
@ -773,6 +787,10 @@ void CHyprDwindleLayout::switchGroupWindow(CWindow* pWindow, bool forward) {
|
||||||
|
|
||||||
// focus
|
// focus
|
||||||
g_pCompositor->focusWindow(PNODE->pGroupParent->groupMembers[PNODE->pGroupParent->groupMemberActive]->pWindow);
|
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) {
|
SWindowRenderLayoutHints CHyprDwindleLayout::requestRenderHints(CWindow* pWindow) {
|
||||||
|
|
Loading…
Reference in a new issue