mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	decorations: make has_ssd public
This commit is contained in:
		
							parent
							
								
									a0debda142
								
							
						
					
					
						commit
						e2590f10fd
					
				
					 3 changed files with 33 additions and 32 deletions
				
			
		
							
								
								
									
										31
									
								
								src/view.c
									
										
									
									
									
								
							
							
						
						
									
										31
									
								
								src/view.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1218,6 +1218,37 @@ view_toggle_maximize(struct view *view, enum view_axis axis)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool
 | 
			
		||||
view_wants_decorations(struct view *view)
 | 
			
		||||
{
 | 
			
		||||
	/* Window-rules take priority if they exist for this view */
 | 
			
		||||
	switch (window_rules_get_property(view, "serverDecoration")) {
 | 
			
		||||
	case LAB_PROP_TRUE:
 | 
			
		||||
		return true;
 | 
			
		||||
	case LAB_PROP_FALSE:
 | 
			
		||||
		return false;
 | 
			
		||||
	default:
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	/*
 | 
			
		||||
	 * view->ssd_preference may be set by the decoration implementation
 | 
			
		||||
	 * e.g. src/decorations/xdg-deco.c or src/decorations/kde-deco.c.
 | 
			
		||||
	 */
 | 
			
		||||
	switch (view->ssd_preference) {
 | 
			
		||||
	case LAB_SSD_PREF_SERVER:
 | 
			
		||||
		return true;
 | 
			
		||||
	case LAB_SSD_PREF_CLIENT:
 | 
			
		||||
		return false;
 | 
			
		||||
	default:
 | 
			
		||||
		/*
 | 
			
		||||
		 * We don't know anything about the client preference
 | 
			
		||||
		 * so fall back to core.decoration settings in rc.xml
 | 
			
		||||
		 */
 | 
			
		||||
		return rc.xdg_shell_server_side_deco;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
view_toggle_decorations(struct view *view)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue