mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Fix titles on rotated outputs
If the output is rotated, the scissor box needs to be transformed in the opposite rotation.
This commit is contained in:
		
							parent
							
								
									22b873332f
								
							
						
					
					
						commit
						4922d269b8
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -308,7 +308,11 @@ static void render_container_simple_border_normal(struct sway_output *output,
 | 
			
		|||
 | 
			
		||||
	// Title text
 | 
			
		||||
	if (title_texture) {
 | 
			
		||||
		wlr_renderer_scissor(renderer, &box);
 | 
			
		||||
		struct wlr_box scissor_box;
 | 
			
		||||
		wlr_box_transform(&box,
 | 
			
		||||
				wlr_output_transform_invert(output->wlr_output->transform),
 | 
			
		||||
				output->swayc->width, output->swayc->height, &scissor_box);
 | 
			
		||||
		wlr_renderer_scissor(renderer, &scissor_box);
 | 
			
		||||
		wlr_render_texture(renderer, title_texture,
 | 
			
		||||
				output->wlr_output->transform_matrix, box.x, box.y, 1);
 | 
			
		||||
		wlr_renderer_scissor(renderer, NULL);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue