mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	xdg: only position topmost view
This commit is contained in:
		
							parent
							
								
									33d02aa83e
								
							
						
					
					
						commit
						5351299cdd
					
				
					 1 changed files with 10 additions and 3 deletions
				
			
		
							
								
								
									
										13
									
								
								src/xdg.c
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								src/xdg.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -142,6 +142,11 @@ static struct border xdg_shell_border(struct view *view)
 | 
			
		|||
	return border;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool istopmost(struct view *view)
 | 
			
		||||
{
 | 
			
		||||
	return view->xdg_surface->toplevel->parent == NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void xdg_toplevel_view_map(struct view *view)
 | 
			
		||||
{
 | 
			
		||||
	view->mapped = true;
 | 
			
		||||
| 
						 | 
				
			
			@ -154,9 +159,11 @@ static void xdg_toplevel_view_map(struct view *view)
 | 
			
		|||
			view->margin = xdg_shell_border(view);
 | 
			
		||||
			view->xdg_grab_offset = -view->margin.left;
 | 
			
		||||
		}
 | 
			
		||||
		/* align to edge of screen */
 | 
			
		||||
		view->x += view->margin.left;
 | 
			
		||||
		view->y += view->margin.top;
 | 
			
		||||
		if (istopmost(view)) {
 | 
			
		||||
			/* align to edge of screen */
 | 
			
		||||
			view->x += view->margin.left;
 | 
			
		||||
			view->y += view->margin.top;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	view->been_mapped = true;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue