mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	config: remove comment describing simple code
This commit is contained in:
		
							parent
							
								
									e1c1b4544d
								
							
						
					
					
						commit
						97e8cb45ec
					
				
					 1 changed files with 3 additions and 14 deletions
				
			
		| 
						 | 
					@ -231,21 +231,10 @@ entry(xmlNode *node, char *nodename, char *content)
 | 
				
			||||||
		rc.raise_on_focus = get_bool(content);
 | 
							rc.raise_on_focus = get_bool(content);
 | 
				
			||||||
	} else if (!strcasecmp(nodename, "doubleClickTime.mouse")) {
 | 
						} else if (!strcasecmp(nodename, "doubleClickTime.mouse")) {
 | 
				
			||||||
		long doubleclick_time_parsed = strtol(content, NULL, 10);
 | 
							long doubleclick_time_parsed = strtol(content, NULL, 10);
 | 
				
			||||||
 | 
							if (doubleclick_time_parsed > 0) {
 | 
				
			||||||
		/*
 | 
					 | 
				
			||||||
		 * There are 2 possible sources for a bad doubleclicktime value:
 | 
					 | 
				
			||||||
		 *  - user gave a value of 0 (which doesn't make sense)
 | 
					 | 
				
			||||||
		 *  - user gave a negative value (which doesn't make sense)
 | 
					 | 
				
			||||||
		 *  - user gave a value which strtol couldn't parse
 | 
					 | 
				
			||||||
		 *
 | 
					 | 
				
			||||||
		 *  since strtol() returns 0 on error, all we have to do is
 | 
					 | 
				
			||||||
		 * check for to see if strtol() returned 0 or less to handle the
 | 
					 | 
				
			||||||
		 * error cases. in case of error, we just choose not to override
 | 
					 | 
				
			||||||
		 * the default value and everything should be fine
 | 
					 | 
				
			||||||
		 */
 | 
					 | 
				
			||||||
		bool valid_doubleclick_time = doubleclick_time_parsed > 0;
 | 
					 | 
				
			||||||
		if (valid_doubleclick_time) {
 | 
					 | 
				
			||||||
			rc.doubleclick_time = doubleclick_time_parsed;
 | 
								rc.doubleclick_time = doubleclick_time_parsed;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								wlr_log(WLR_ERROR, "invalid doubleClickTime");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else if (!strcasecmp(nodename, "name.context.mouse")) {
 | 
						} else if (!strcasecmp(nodename, "name.context.mouse")) {
 | 
				
			||||||
		current_mouse_context = content;
 | 
							current_mouse_context = content;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue