mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	xdg-toplevel: treat unmapped parents as NULL
This commit is contained in:
		
							parent
							
								
									2e14bed9f7
								
							
						
					
					
						commit
						bf3f60ff73
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -151,11 +151,13 @@ void wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel,
 | 
			
		|||
		wl_list_remove(&toplevel->parent_unmap.link);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	if (parent && parent->base->mapped) {
 | 
			
		||||
		toplevel->parent = parent;
 | 
			
		||||
	if (parent) {
 | 
			
		||||
		toplevel->parent_unmap.notify = handle_parent_unmap;
 | 
			
		||||
		wl_signal_add(&toplevel->parent->base->events.unmap,
 | 
			
		||||
			&toplevel->parent_unmap);
 | 
			
		||||
	} else {
 | 
			
		||||
		toplevel->parent = NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wlr_signal_emit_safe(&toplevel->events.set_parent, NULL);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue