mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	compositor: notify subsurfaces about a commit in the rendering order
This is the default order used across wlroots unless the reversed order specifically is required (e.g. in wlr_surface_surface_at()).
This commit is contained in:
		
							parent
							
								
									49e9be62ae
								
							
						
					
					
						commit
						b61d5922f1
					
				
					 1 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
					@ -470,18 +470,16 @@ static void surface_commit_state(struct wlr_surface *surface,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// commit subsurface order
 | 
						// commit subsurface order
 | 
				
			||||||
	struct wlr_subsurface *subsurface;
 | 
						struct wlr_subsurface *subsurface;
 | 
				
			||||||
	wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_above,
 | 
						wl_list_for_each(subsurface, &surface->pending.subsurfaces_below, pending.link) {
 | 
				
			||||||
			pending.link) {
 | 
					 | 
				
			||||||
		wl_list_remove(&subsurface->current.link);
 | 
							wl_list_remove(&subsurface->current.link);
 | 
				
			||||||
		wl_list_insert(&surface->current.subsurfaces_above,
 | 
							wl_list_insert(surface->current.subsurfaces_below.prev,
 | 
				
			||||||
			&subsurface->current.link);
 | 
								&subsurface->current.link);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		subsurface_handle_parent_commit(subsurface);
 | 
							subsurface_handle_parent_commit(subsurface);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	wl_list_for_each_reverse(subsurface, &surface->pending.subsurfaces_below,
 | 
						wl_list_for_each(subsurface, &surface->pending.subsurfaces_above, pending.link) {
 | 
				
			||||||
			pending.link) {
 | 
					 | 
				
			||||||
		wl_list_remove(&subsurface->current.link);
 | 
							wl_list_remove(&subsurface->current.link);
 | 
				
			||||||
		wl_list_insert(&surface->current.subsurfaces_below,
 | 
							wl_list_insert(surface->current.subsurfaces_above.prev,
 | 
				
			||||||
			&subsurface->current.link);
 | 
								&subsurface->current.link);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		subsurface_handle_parent_commit(subsurface);
 | 
							subsurface_handle_parent_commit(subsurface);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue