mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	layout: add_sibling: Handle floating views properly.
This should fix #241.
This commit is contained in:
		
							parent
							
								
									53ec7a74b6
								
							
						
					
					
						commit
						8aef255d5f
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
					@ -88,12 +88,16 @@ void add_floating(swayc_t *ws, swayc_t *child) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
swayc_t *add_sibling(swayc_t *sibling, swayc_t *child) {
 | 
					swayc_t *add_sibling(swayc_t *fixed, swayc_t *active) {
 | 
				
			||||||
	swayc_t *parent = sibling->parent;
 | 
						swayc_t *parent = fixed->parent;
 | 
				
			||||||
	int i = index_child(sibling);
 | 
						int i = index_child(fixed);
 | 
				
			||||||
	list_insert(parent->children, i+1, child);
 | 
						if (fixed->is_floating) {
 | 
				
			||||||
	child->parent = parent;
 | 
							list_insert(parent->floating, i + 1, active);
 | 
				
			||||||
	return child->parent;
 | 
						} else {
 | 
				
			||||||
 | 
							list_insert(parent->children, i + 1, active);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						active->parent = parent;
 | 
				
			||||||
 | 
						return active->parent;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
swayc_t *replace_child(swayc_t *child, swayc_t *new_child) {
 | 
					swayc_t *replace_child(swayc_t *child, swayc_t *new_child) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue