mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Flatten container in workspace_rejigger
This commit is contained in:
		
							parent
							
								
									0b7fb6943e
								
							
						
					
					
						commit
						9753e52d6b
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -266,10 +266,11 @@ static void workspace_rejigger(struct sway_workspace *ws,
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	container_detach(child);
 | 
						container_detach(child);
 | 
				
			||||||
	workspace_wrap_children(ws);
 | 
						struct sway_container *new_parent = workspace_wrap_children(ws);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int index = move_dir == MOVE_LEFT || move_dir == MOVE_UP ? 0 : 1;
 | 
						int index = move_dir == MOVE_LEFT || move_dir == MOVE_UP ? 0 : 1;
 | 
				
			||||||
	workspace_insert_tiling(ws, child, index);
 | 
						workspace_insert_tiling(ws, child, index);
 | 
				
			||||||
 | 
						container_flatten(new_parent);
 | 
				
			||||||
	ws->layout =
 | 
						ws->layout =
 | 
				
			||||||
		move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT;
 | 
							move_dir == MOVE_LEFT || move_dir == MOVE_RIGHT ? L_HORIZ : L_VERT;
 | 
				
			||||||
	workspace_update_representation(ws);
 | 
						workspace_update_representation(ws);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue