mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	subcompositor: consider map on creation
wl_subsurface description states: A sub-surface becomes mapped, when a non-NULL wl_buffer is applied and the parent surface is mapped. Note that this doesn't require an explicit commit, which means that a newly created subsurface with a mapped parent and a buffer already attached must be mapped immediately. This can happen with the following sequence of events: - subcompositor.get_subsurface(subsurface, surface, parent) - surface.attach(buffer) - surface.commit() - subsurface.destroy() - subcompositor.get_subsurface(subsurface, surface, parent) Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3449
This commit is contained in:
		
							parent
							
								
									2a1d7d40f4
								
							
						
					
					
						commit
						ec8b49c93f
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -374,6 +374,8 @@ static struct wlr_subsurface *subsurface_create(struct wlr_surface *surface,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	surface->role_data = subsurface;
 | 
						surface->role_data = subsurface;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						subsurface_consider_map(subsurface, true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return subsurface;
 | 
						return subsurface;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue