mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	view: use seat_consider_warp_to_focus in view_unmap
The view_unmap function contained an open coded version of seat_consider_warp_to_focus, replace it with a call to the function.
This commit is contained in:
		
							parent
							
								
									fde900861a
								
							
						
					
					
						commit
						0b18560952
					
				
					 1 changed files with 1 additions and 8 deletions
				
			
		| 
						 | 
				
			
			@ -654,14 +654,7 @@ void view_unmap(struct sway_view *view) {
 | 
			
		|||
 | 
			
		||||
	struct sway_seat *seat;
 | 
			
		||||
	wl_list_for_each(seat, &server.input->seats, link) {
 | 
			
		||||
		if (config->mouse_warping == WARP_CONTAINER) {
 | 
			
		||||
			struct sway_node *node = seat_get_focus(seat);
 | 
			
		||||
			if (node && node->type == N_CONTAINER) {
 | 
			
		||||
				cursor_warp_to_container(seat->cursor, node->sway_container);
 | 
			
		||||
			} else if (node && node->type == N_WORKSPACE) {
 | 
			
		||||
				cursor_warp_to_workspace(seat->cursor, node->sway_workspace);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		seat_consider_warp_to_focus(seat);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	transaction_commit_dirty();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue