mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	add comment for output box in toplevel coords
This commit is contained in:
		
							parent
							
								
									cf13a6d9c6
								
							
						
					
					
						commit
						71da20dbde
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -84,14 +84,16 @@ static void popup_unconstrain(struct roots_xdg_popup_v6 *popup) {
 | 
				
			||||||
	int width = 0, height = 0;
 | 
						int width = 0, height = 0;
 | 
				
			||||||
	wlr_output_effective_resolution(output, &width, &height);
 | 
						wlr_output_effective_resolution(output, &width, &height);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct wlr_box toplevel_box = {
 | 
						// the output box expressed in the coordinate system of the toplevel parent
 | 
				
			||||||
 | 
						// of the popup
 | 
				
			||||||
 | 
						struct wlr_box output_box_toplevel = {
 | 
				
			||||||
		.x = output->lx - view->x,
 | 
							.x = output->lx - view->x,
 | 
				
			||||||
		.y = output->ly - view->y,
 | 
							.y = output->ly - view->y,
 | 
				
			||||||
		.width = width,
 | 
							.width = width,
 | 
				
			||||||
		.height = height
 | 
							.height = height
 | 
				
			||||||
	};
 | 
						};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_xdg_popup_v6_unconstrain_from_box(popup->wlr_popup, &toplevel_box);
 | 
						wlr_xdg_popup_v6_unconstrain_from_box(popup->wlr_popup, &output_box_toplevel);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct roots_xdg_popup_v6 *popup_create(struct roots_view *view,
 | 
					static struct roots_xdg_popup_v6 *popup_create(struct roots_view *view,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue