mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	scene: ensure layer surface usable area >0
Clients may, for example, commit an exclusive zone larger than the
output dimensions. Compositors must handle this gracefully, which likely
requires more work on the compositor side but returning a usable area
with negative width or height in wlr_scene_layer_surface_v1_configure()
is nonsensical.
(cherry picked from commit cb01c63a8d)
			
			
This commit is contained in:
		
							parent
							
								
									59f026465e
								
							
						
					
					
						commit
						545a294532
					
				
					 1 changed files with 7 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -70,6 +70,13 @@ static void layer_surface_exclusive_zone(
 | 
			
		|||
		usable_area->width -= state->exclusive_zone + state->margin.right;
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (usable_area->width < 0) {
 | 
			
		||||
		usable_area->width = 0;
 | 
			
		||||
	}
 | 
			
		||||
	if (usable_area->height < 0) {
 | 
			
		||||
		usable_area->height = 0;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wlr_scene_layer_surface_v1_configure(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue