mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	tree/view: ensure content_{width,height} is positive
The size computations may result in a zero or negative size, which are not valid wl_surface sizes.
This commit is contained in:
		
							parent
							
								
									5f15c5e91d
								
							
						
					
					
						commit
						fce8de0f67
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -365,8 +365,8 @@ void view_autoconfigure(struct sway_view *view) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	con->pending.content_x = x;
 | 
						con->pending.content_x = x;
 | 
				
			||||||
	con->pending.content_y = y;
 | 
						con->pending.content_y = y;
 | 
				
			||||||
	con->pending.content_width = width;
 | 
						con->pending.content_width = fmax(width, 1);
 | 
				
			||||||
	con->pending.content_height = height;
 | 
						con->pending.content_height = fmax(height, 1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void view_set_activated(struct sway_view *view, bool activated) {
 | 
					void view_set_activated(struct sway_view *view, bool activated) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue