mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #2200 from mucamaca/fix_transparency
Fix #1857 -> transparency in swaylock
This commit is contained in:
		
						commit
						f414885b1d
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -30,6 +30,8 @@ void render_frame(struct swaylock_surface *surface) {
 | 
			
		|||
	cairo_t *cairo = surface->current_buffer->cairo;
 | 
			
		||||
	cairo_identity_matrix(cairo);
 | 
			
		||||
 | 
			
		||||
	cairo_save(cairo);
 | 
			
		||||
	cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
 | 
			
		||||
	if (state->args.mode == BACKGROUND_MODE_SOLID_COLOR || !surface->image) {
 | 
			
		||||
		cairo_set_source_u32(cairo, state->args.color);
 | 
			
		||||
		cairo_paint(cairo);
 | 
			
		||||
| 
						 | 
				
			
			@ -37,6 +39,7 @@ void render_frame(struct swaylock_surface *surface) {
 | 
			
		|||
		render_background_image(cairo, surface->image,
 | 
			
		||||
				state->args.mode, buffer_width, buffer_height);
 | 
			
		||||
	}
 | 
			
		||||
	cairo_restore(cairo);
 | 
			
		||||
	cairo_identity_matrix(cairo);
 | 
			
		||||
 | 
			
		||||
	int arc_radius = ARC_RADIUS * surface->scale;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue