mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	ipc: make get_deco_rect check config->hide_lone_tab
Without this, the `IPC_GET_TREE` ipc call would return false information about the container's `deco_rect` and `rect` properties if `hide_edge_borders --i3` was in effect.
This commit is contained in:
		
							parent
							
								
									e98b97a45b
								
							
						
					
					
						commit
						a5a44ba95b
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -458,7 +458,9 @@ static void ipc_json_describe_workspace(struct sway_workspace *workspace,
 | 
			
		|||
 | 
			
		||||
static void get_deco_rect(struct sway_container *c, struct wlr_box *deco_rect) {
 | 
			
		||||
	enum sway_container_layout parent_layout = container_parent_layout(c);
 | 
			
		||||
	bool tab_or_stack = parent_layout == L_TABBED || parent_layout == L_STACKED;
 | 
			
		||||
	list_t *siblings = container_get_siblings(c);
 | 
			
		||||
	bool tab_or_stack = (parent_layout == L_TABBED || parent_layout == L_STACKED)
 | 
			
		||||
		&& ((siblings && siblings->length > 1) || !config->hide_lone_tab);
 | 
			
		||||
	if (((!tab_or_stack || container_is_floating(c)) &&
 | 
			
		||||
				c->current.border != B_NORMAL) ||
 | 
			
		||||
			c->pending.fullscreen_mode != FULLSCREEN_NONE ||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue