mirror of
				https://github.com/ItsDrike/hyprland-dwindle-autogroup.git
				synced 2025-11-04 01:16:36 +00:00 
			
		
		
		
	Fix crash on single window group
This commit is contained in:
		
							parent
							
								
									49b45918db
								
							
						
					
					
						commit
						ab36aeeae7
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -108,9 +108,13 @@ void newCreateGroup(CWindow* self)
 | 
			
		|||
 | 
			
		||||
    // Collect all child dwindle nodes, we'll want to add all of those into a group
 | 
			
		||||
    const auto P_DWINDLE_NODE = g_pNodeFromWindow(pDwindleLayout, self);
 | 
			
		||||
    const auto P_PARENT_NODE = P_DWINDLE_NODE->pParent;
 | 
			
		||||
    if (!P_PARENT_NODE) {
 | 
			
		||||
        Debug::log(LOG, "[dwindle-autogroup] Ignoring autogroup for a single window");
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
    const auto P_SIBLING_NODE = P_PARENT_NODE->children[0] == P_DWINDLE_NODE ? P_PARENT_NODE->children[1] : P_PARENT_NODE->children[0];
 | 
			
		||||
    std::deque<SDwindleNodeData*> p_dDwindleNodes;
 | 
			
		||||
    const auto P_SIBLING_NODE =
 | 
			
		||||
        P_DWINDLE_NODE->pParent->children[0] == P_DWINDLE_NODE ? P_DWINDLE_NODE->pParent->children[1] : P_DWINDLE_NODE->pParent->children[0];
 | 
			
		||||
    collectDwindleChildNodes(&p_dDwindleNodes, P_SIBLING_NODE);
 | 
			
		||||
 | 
			
		||||
    // Stop if one of the dwindle child nodes is already in a group
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue