mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	tearing: add fullscreen options (#1941)
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									19f0b769de
								
							
						
					
					
						commit
						433a4509af
					
				
					 9 changed files with 105 additions and 20 deletions
				
			
		| 
						 | 
				
			
			@ -772,6 +772,20 @@ set_adaptive_sync_mode(const char *str, enum adaptive_sync_mode *variable)
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
set_tearing_mode(const char *str, enum tearing_mode *variable)
 | 
			
		||||
{
 | 
			
		||||
	if (!strcasecmp(str, "fullscreen")) {
 | 
			
		||||
		*variable = LAB_TEARING_FULLSCREEN;
 | 
			
		||||
	} else if (!strcasecmp(str, "fullscreenForced")) {
 | 
			
		||||
		*variable = LAB_TEARING_FULLSCREEN_FORCED;
 | 
			
		||||
	} else if (parse_bool(str, -1) == 1) {
 | 
			
		||||
		*variable = LAB_TEARING_ENABLED;
 | 
			
		||||
	} else {
 | 
			
		||||
		*variable = LAB_TEARING_DISABLED;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
entry(xmlNode *node, char *nodename, char *content)
 | 
			
		||||
{
 | 
			
		||||
| 
						 | 
				
			
			@ -886,7 +900,7 @@ entry(xmlNode *node, char *nodename, char *content)
 | 
			
		|||
	} else if (!strcasecmp(nodename, "adaptiveSync.core")) {
 | 
			
		||||
		set_adaptive_sync_mode(content, &rc.adaptive_sync);
 | 
			
		||||
	} else if (!strcasecmp(nodename, "allowTearing.core")) {
 | 
			
		||||
		set_bool(content, &rc.allow_tearing);
 | 
			
		||||
		set_tearing_mode(content, &rc.allow_tearing);
 | 
			
		||||
	} else if (!strcasecmp(nodename, "reuseOutputMode.core")) {
 | 
			
		||||
		set_bool(content, &rc.reuse_output_mode);
 | 
			
		||||
	} else if (!strcmp(nodename, "policy.placement")) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue