mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Currently, we anchor the right/bottom edge of the view whenever the top/ left edge is moving (current.x/y != pending.x/y). Doing so doesn't make much sense when the right/bottom edge is also moving. In that case it's probably best to move the view (or at least its top/left corner) directly to its final position. The most noticeable effect of this change is with views that don't accept their requested size exactly when tiled or maximized (examples: havoc, xfce4-terminal). Previously, their right-bottom corner would be aligned with the screen edge, leaving gaps on the left and top. Now the top-left corner will be aligned and the gaps will be on the right and bottom. This is still not ideal, but IMHO less surprising to the user.
		
			
				
	
	
		
			22 lines
		
	
	
	
		
			687 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
	
		
			687 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
						|
#ifndef __LABWC_VIEW_IMPL_COMMON_H
 | 
						|
#define __LABWC_VIEW_IMPL_COMMON_H
 | 
						|
/*
 | 
						|
 * Common code for view->impl functions
 | 
						|
 *
 | 
						|
 * Please note: only xdg-shell-toplevel-view and xwayland-view view_impl
 | 
						|
 * functions should call these functions.
 | 
						|
 */
 | 
						|
struct view;
 | 
						|
 | 
						|
void view_impl_move_to_front(struct view *view);
 | 
						|
void view_impl_map(struct view *view);
 | 
						|
 | 
						|
/*
 | 
						|
 * Updates view geometry at commit based on current position/size,
 | 
						|
 * pending move/resize, and committed surface size. The computed
 | 
						|
 * position may not match pending.x/y exactly in some cases.
 | 
						|
 */
 | 
						|
void view_impl_apply_geometry(struct view *view, int w, int h);
 | 
						|
 | 
						|
#endif /* __LABWC_VIEW_IMPL_COMMON_H */
 |