mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-02 11:05:58 +01:00
log more in group creation
This commit is contained in:
parent
198b7cae12
commit
20899b597e
1 changed files with 12 additions and 6 deletions
|
@ -814,13 +814,15 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) {
|
||||||
// get the node
|
// get the node
|
||||||
const auto PNODE = getNodeFromWindow(pWindow);
|
const auto PNODE = getNodeFromWindow(pWindow);
|
||||||
|
|
||||||
if (!PNODE)
|
if (!PNODE) {
|
||||||
return; // reject
|
Debug::log(LOG, "Rejecting to group a floating window");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID);
|
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID);
|
||||||
|
|
||||||
if (PWORKSPACE->m_bHasFullscreenWindow && !PNODE->isGroupMember()) {
|
if (PWORKSPACE->m_bHasFullscreenWindow && !PNODE->isGroupMember()) {
|
||||||
Debug::log(ERR, "Cannot enable group on fullscreen window");
|
Debug::log(ERR, "Cannot enable group on a fullscreen window");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -874,8 +876,10 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) {
|
||||||
} else {
|
} else {
|
||||||
// create group
|
// create group
|
||||||
|
|
||||||
if (!PNODE->pParent)
|
if (!PNODE->pParent) {
|
||||||
|
Debug::log(LOG, "Rejecting to group a solitary window");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
PNODE->groupHead = true;
|
PNODE->groupHead = true;
|
||||||
|
|
||||||
|
@ -887,8 +891,10 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) {
|
||||||
addToDequeRecursive(&newGroupMembers, &nodesToRemove, PNODE->pParent->children[0] == PNODE ? PNODE->pParent->children[1] : PNODE->pParent->children[0]);
|
addToDequeRecursive(&newGroupMembers, &nodesToRemove, PNODE->pParent->children[0] == PNODE ? PNODE->pParent->children[1] : PNODE->pParent->children[0]);
|
||||||
|
|
||||||
for (auto& n : newGroupMembers) {
|
for (auto& n : newGroupMembers) {
|
||||||
if (n->isGroupMember())
|
if (n->isGroupMember()) {
|
||||||
return; // reject nested groups
|
Debug::log(LOG, "Rejecting to nest groups");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& nd : nodesToRemove) {
|
for (auto& nd : nodesToRemove) {
|
||||||
|
|
Loading…
Reference in a new issue