mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	Adds following settings:
<placement>
  <policy>cascade</policy>
  <cascadeOffset x="40" y="30" />
</placement>
"Cascade" policy places a new window at the center of the screen like
"center" policy, but possibly shifts its position to bottom-right so the
new window doesn't cover existing windows.
The algorithm is copied from KWin's implementation:
df9f8f8346/src/placement.cpp (L589)
Also added some helper functions to manipulate `wlr_box`.
		
	
			
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			408 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			408 B
		
	
	
	
		
			C
		
	
	
	
	
	
/* SPDX-License-Identifier: GPL-2.0-only */
 | 
						|
#ifndef LABWC_BOX_H
 | 
						|
#define LABWC_BOX_H
 | 
						|
 | 
						|
#include <wlr/util/box.h>
 | 
						|
 | 
						|
bool
 | 
						|
box_contains(struct wlr_box *box_super, struct wlr_box *box_sub);
 | 
						|
 | 
						|
bool
 | 
						|
box_intersects(struct wlr_box *box_a, struct wlr_box *box_b);
 | 
						|
 | 
						|
/* Returns the bounding box of 2 boxes */
 | 
						|
void
 | 
						|
box_union(struct wlr_box *box_dest, struct wlr_box *box_a, struct wlr_box *box_b);
 | 
						|
 | 
						|
#endif /* LABWC_BOX_H */
 |