mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Damage all surfaces when damaging whole container
This commit is contained in:
		
							parent
							
								
									58914822aa
								
							
						
					
					
						commit
						0c627918bb
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
					@ -401,6 +401,17 @@ void output_damage_view(struct sway_output *output, struct sway_view *view,
 | 
				
			||||||
		damage_surface_iterator, &data);
 | 
							damage_surface_iterator, &data);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static void output_damage_whole_container_iterator(struct sway_container *con,
 | 
				
			||||||
 | 
							void *data) {
 | 
				
			||||||
 | 
						struct sway_output *output = data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (!sway_assert(con->type != C_VIEW, "expected a view")) {
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						output_damage_view(output, con->sway_view, true);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void output_damage_whole_container(struct sway_output *output,
 | 
					void output_damage_whole_container(struct sway_output *output,
 | 
				
			||||||
		struct sway_container *con) {
 | 
							struct sway_container *con) {
 | 
				
			||||||
	float scale = output->wlr_output->scale;
 | 
						float scale = output->wlr_output->scale;
 | 
				
			||||||
| 
						 | 
					@ -411,6 +422,9 @@ void output_damage_whole_container(struct sway_output *output,
 | 
				
			||||||
		.height = con->height * scale,
 | 
							.height = con->height * scale,
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
	wlr_output_damage_add_box(output->damage, &box);
 | 
						wlr_output_damage_add_box(output->damage, &box);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						container_descendants(con, C_VIEW, output_damage_whole_container_iterator,
 | 
				
			||||||
 | 
							output);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void damage_handle_destroy(struct wl_listener *listener, void *data) {
 | 
					static void damage_handle_destroy(struct wl_listener *listener, void *data) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue