From 20899b597e8b9f16dc3f311fb8d1b8f340ea8ef8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 16 Dec 2022 00:22:23 +0000 Subject: [PATCH] log more in group creation --- src/layout/DwindleLayout.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp index 9cac70d5..e8371e4c 100644 --- a/src/layout/DwindleLayout.cpp +++ b/src/layout/DwindleLayout.cpp @@ -814,13 +814,15 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) { // get the node const auto PNODE = getNodeFromWindow(pWindow); - if (!PNODE) - return; // reject + if (!PNODE) { + Debug::log(LOG, "Rejecting to group a floating window"); + return; + } const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PNODE->workspaceID); 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; } @@ -874,8 +876,10 @@ void CHyprDwindleLayout::toggleWindowGroup(CWindow* pWindow) { } else { // create group - if (!PNODE->pParent) + if (!PNODE->pParent) { + Debug::log(LOG, "Rejecting to group a solitary window"); return; + } 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]); for (auto& n : newGroupMembers) { - if (n->isGroupMember()) - return; // reject nested groups + if (n->isGroupMember()) { + Debug::log(LOG, "Rejecting to nest groups"); + return; + } } for (auto& nd : nodesToRemove) {