mirror of
				https://codeberg.org/dwl/dwl.git
				synced 2025-11-03 09:01:45 -05:00 
			
		
		
		
	Added support for natural scrolling
This commit is contained in:
		
							parent
							
								
									4f1e557d3d
								
							
						
					
					
						commit
						aa679c4f29
					
				
					 2 changed files with 6 additions and 0 deletions
				
			
		| 
						 | 
					@ -44,6 +44,7 @@ static const struct xkb_rule_names xkb_rules = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Trackpad */
 | 
					/* Trackpad */
 | 
				
			||||||
int tap_to_click = 1;
 | 
					int tap_to_click = 1;
 | 
				
			||||||
 | 
					int natural_scrolling = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static const int repeat_rate = 25;
 | 
					static const int repeat_rate = 25;
 | 
				
			||||||
static const int repeat_delay = 600;
 | 
					static const int repeat_delay = 600;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										5
									
								
								dwl.c
									
										
									
									
									
								
							
							
						
						
									
										5
									
								
								dwl.c
									
										
									
									
									
								
							| 
						 | 
					@ -974,8 +974,13 @@ createpointer(struct wlr_input_device *device)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct libinput_device *libinput_device =  (struct libinput_device*)
 | 
						struct libinput_device *libinput_device =  (struct libinput_device*)
 | 
				
			||||||
			wlr_libinput_get_device_handle(device);
 | 
								wlr_libinput_get_device_handle(device);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (tap_to_click && libinput_device_config_tap_get_finger_count(libinput_device))
 | 
						if (tap_to_click && libinput_device_config_tap_get_finger_count(libinput_device))
 | 
				
			||||||
		libinput_device_config_tap_set_enabled(libinput_device, LIBINPUT_CONFIG_TAP_ENABLED);
 | 
							libinput_device_config_tap_set_enabled(libinput_device, LIBINPUT_CONFIG_TAP_ENABLED);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (libinput_device_config_scroll_has_natural_scroll(libinput_device))
 | 
				
			||||||
 | 
							libinput_device_config_scroll_set_natural_scroll_enabled(libinput_device, natural_scrolling);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* We don't do anything special with pointers. All of our pointer handling
 | 
						/* We don't do anything special with pointers. All of our pointer handling
 | 
				
			||||||
	 * is proxied through wlr_cursor. On another compositor, you might take this
 | 
						 * is proxied through wlr_cursor. On another compositor, you might take this
 | 
				
			||||||
	 * opportunity to do libinput configuration on the device to set
 | 
						 * opportunity to do libinput configuration on the device to set
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue