mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	return early when no dest_x/y in output layout closest point
This commit is contained in:
		
							parent
							
								
									67c8aec77f
								
							
						
					
					
						commit
						bf5ae85683
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -313,6 +313,10 @@ void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
 | 
			
		|||
void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
 | 
			
		||||
		struct wlr_output *reference, double x, double y, double *dest_x,
 | 
			
		||||
		double *dest_y) {
 | 
			
		||||
	if (dest_x == NULL && dest_y == NULL) {
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	double min_x = DBL_MAX, min_y = DBL_MAX, min_distance = DBL_MAX;
 | 
			
		||||
	struct wlr_output_layout_output *l_output;
 | 
			
		||||
	wl_list_for_each(l_output, &layout->outputs, link) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue