mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	scene: destroy addons before cleaning up internal state
This allows addons to access wlr_scene_node/wlr_scene_surface fields to clean up themselves.
This commit is contained in:
		
							parent
							
								
									24c149fefb
								
							
						
					
					
						commit
						440d7fa072
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -87,6 +87,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
 | 
				
			||||||
	// in case the destroy signal would like to remove children before they
 | 
						// in case the destroy signal would like to remove children before they
 | 
				
			||||||
	// are recursively destroyed.
 | 
						// are recursively destroyed.
 | 
				
			||||||
	wl_signal_emit_mutable(&node->events.destroy, NULL);
 | 
						wl_signal_emit_mutable(&node->events.destroy, NULL);
 | 
				
			||||||
 | 
						wlr_addon_set_finish(&node->addons);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_scene_node_set_enabled(node, false);
 | 
						wlr_scene_node_set_enabled(node, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -130,7 +131,6 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_addon_set_finish(&node->addons);
 | 
					 | 
				
			||||||
	wl_list_remove(&node->link);
 | 
						wl_list_remove(&node->link);
 | 
				
			||||||
	pixman_region32_fini(&node->visible);
 | 
						pixman_region32_fini(&node->visible);
 | 
				
			||||||
	free(node);
 | 
						free(node);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue