mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	seatop_move_tiling: do not move to descendant
In seatop_move_tiling, it is possible to cause a stack overflow by dragging a container into one of its descendants. This disables the ability to move into a descendant.
This commit is contained in:
		
							parent
							
								
									ab42874f71
								
							
						
					
					
						commit
						e8c472aee9
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -164,7 +164,8 @@ static void handle_motion_postthreshold(struct sway_seat *seat) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Use the hovered view - but we must be over the actual surface
 | 
						// Use the hovered view - but we must be over the actual surface
 | 
				
			||||||
	con = node->sway_container;
 | 
						con = node->sway_container;
 | 
				
			||||||
	if (!con->view->surface || node == &e->con->node) {
 | 
						if (!con->view->surface || node == &e->con->node
 | 
				
			||||||
 | 
								|| node_has_ancestor(node, &e->con->node)) {
 | 
				
			||||||
		e->target_node = NULL;
 | 
							e->target_node = NULL;
 | 
				
			||||||
		e->target_edge = WLR_EDGE_NONE;
 | 
							e->target_edge = WLR_EDGE_NONE;
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue