mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	view: apply output scale in view_center()
This commit is contained in:
		
							parent
							
								
									9e2af19caf
								
							
						
					
					
						commit
						620cd84a8a
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -59,8 +59,8 @@ view_center(struct view *view)
 | 
			
		|||
	struct wlr_output_layout *layout = view->server->output_layout;
 | 
			
		||||
	struct wlr_output_layout_output* ol_output =
 | 
			
		||||
		wlr_output_layout_get(layout, wlr_output);
 | 
			
		||||
	int center_x = ol_output->x + wlr_output->width / 2;
 | 
			
		||||
	int center_y = ol_output->y + wlr_output->height / 2;
 | 
			
		||||
	int center_x = ol_output->x + wlr_output->width / wlr_output->scale / 2;
 | 
			
		||||
	int center_y = ol_output->y + wlr_output->height / wlr_output->scale / 2;
 | 
			
		||||
	view_move(view, center_x - view->w / 2, center_y - view->h / 2);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue