mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	push all parents of focused container in focus stack
This commit is contained in:
		
							parent
							
								
									9db859585e
								
							
						
					
					
						commit
						46280460a5
					
				
					 1 changed files with 14 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -413,10 +413,23 @@ void seat_set_focus_warp(struct sway_seat *seat,
 | 
			
		|||
	if (container) {
 | 
			
		||||
		struct sway_seat_container *seat_con =
 | 
			
		||||
			seat_container_from_container(seat, container);
 | 
			
		||||
		if (!seat_con) {
 | 
			
		||||
		if (seat_con == NULL) {
 | 
			
		||||
			return;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// put all the anscestors of this container on top of the focus stack
 | 
			
		||||
		struct sway_seat_container *parent =
 | 
			
		||||
				seat_container_from_container(seat,
 | 
			
		||||
					seat_con->container->parent);
 | 
			
		||||
		while (parent) {
 | 
			
		||||
			wl_list_remove(&parent->link);
 | 
			
		||||
			wl_list_insert(&seat->focus_stack, &parent->link);
 | 
			
		||||
 | 
			
		||||
			parent =
 | 
			
		||||
				seat_container_from_container(seat,
 | 
			
		||||
					parent->container->parent);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		wl_list_remove(&seat_con->link);
 | 
			
		||||
		wl_list_insert(&seat->focus_stack, &seat_con->link);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue