mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	
							parent
							
								
									d68376f2ac
								
							
						
					
					
						commit
						a457542fb1
					
				
					 5 changed files with 138 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -21,6 +21,7 @@
 | 
			
		|||
#include "common/mem.h"
 | 
			
		||||
#include "common/nodename.h"
 | 
			
		||||
#include "common/parse-bool.h"
 | 
			
		||||
#include "common/parse-double.h"
 | 
			
		||||
#include "common/string-helpers.h"
 | 
			
		||||
#include "config/default-bindings.h"
 | 
			
		||||
#include "config/keybind.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -537,7 +538,7 @@ fill_libinput_category(char *nodename, char *content)
 | 
			
		|||
	} else if (!strcasecmp(nodename, "leftHanded")) {
 | 
			
		||||
		set_bool_as_int(content, ¤t_libinput_category->left_handed);
 | 
			
		||||
	} else if (!strcasecmp(nodename, "pointerSpeed")) {
 | 
			
		||||
		current_libinput_category->pointer_speed = atof(content);
 | 
			
		||||
		set_float(content, ¤t_libinput_category->pointer_speed);
 | 
			
		||||
		if (current_libinput_category->pointer_speed < -1) {
 | 
			
		||||
			current_libinput_category->pointer_speed = -1;
 | 
			
		||||
		} else if (current_libinput_category->pointer_speed > 1) {
 | 
			
		||||
| 
						 | 
				
			
			@ -883,7 +884,7 @@ entry(xmlNode *node, char *nodename, char *content)
 | 
			
		|||
			wlr_log(WLR_ERROR, "invalid doubleClickTime");
 | 
			
		||||
		}
 | 
			
		||||
	} else if (!strcasecmp(nodename, "scrollFactor.mouse")) {
 | 
			
		||||
		rc.scroll_factor = atof(content);
 | 
			
		||||
		set_double(content, &rc.scroll_factor);
 | 
			
		||||
	} else if (!strcasecmp(nodename, "name.context.mouse")) {
 | 
			
		||||
		current_mouse_context = content;
 | 
			
		||||
		current_mousebind = NULL;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
#include <stdint.h>
 | 
			
		||||
#include <strings.h>
 | 
			
		||||
#include <wlr/util/log.h>
 | 
			
		||||
#include "common/parse-double.h"
 | 
			
		||||
#include "config/tablet.h"
 | 
			
		||||
#include "config/rcxml.h"
 | 
			
		||||
#include "input/tablet_pad.h"
 | 
			
		||||
| 
						 | 
				
			
			@ -11,7 +12,8 @@
 | 
			
		|||
double
 | 
			
		||||
tablet_get_dbl_if_positive(const char *content, const char *name)
 | 
			
		||||
{
 | 
			
		||||
	double value = atof(content);
 | 
			
		||||
	double value = 0;
 | 
			
		||||
	set_double(content, &value);
 | 
			
		||||
	if (value < 0) {
 | 
			
		||||
		wlr_log(WLR_ERROR, "Invalid value for tablet area %s", name);
 | 
			
		||||
		return 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue