mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc: fix rect for stacked children
This now takes all titlebars for stacked children into account for the ipc property `rect`
This commit is contained in:
		
							parent
							
								
									8b6bd106aa
								
							
						
					
					
						commit
						8ada2daba5
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -535,8 +535,12 @@ json_object *ipc_json_describe_node(struct sway_node *node) {
 | 
			
		|||
	if (node->type == N_CONTAINER) {
 | 
			
		||||
		struct wlr_box deco_rect = {0, 0, 0, 0};
 | 
			
		||||
		get_deco_rect(node->sway_container, &deco_rect);
 | 
			
		||||
		box.y += deco_rect.height;
 | 
			
		||||
		box.height -= deco_rect.height;
 | 
			
		||||
		size_t count = 1;
 | 
			
		||||
		if (container_parent_layout(node->sway_container) == L_STACKED) {
 | 
			
		||||
			count = container_get_siblings(node->sway_container)->length;
 | 
			
		||||
		}
 | 
			
		||||
		box.y += deco_rect.height * count;
 | 
			
		||||
		box.height -= deco_rect.height * count;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	json_object *focus = json_object_new_array();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue