mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	layer_shell: Guard against negative exclusive zone
This can happen with surfaces that set negative margins.
This commit is contained in:
		
							parent
							
								
									6200ecbc1d
								
							
						
					
					
						commit
						8bd3b7be8a
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -68,7 +68,7 @@ static void apply_exclusive(struct wlr_box *usable_area,
 | 
			
		|||
		},
 | 
			
		||||
	};
 | 
			
		||||
	for (size_t i = 0; i < sizeof(edges) / sizeof(edges[0]); ++i) {
 | 
			
		||||
		if ((anchor & edges[i].anchors) == edges[i].anchors) {
 | 
			
		||||
		if ((anchor & edges[i].anchors) == edges[i].anchors && exclusive + edges[i].margin > 0) {
 | 
			
		||||
			if (edges[i].positive_axis) {
 | 
			
		||||
				*edges[i].positive_axis += exclusive + edges[i].margin;
 | 
			
		||||
			}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue