mirror of
				https://github.com/swaywm/sway.git
				synced 2025-11-03 09:01:43 -05:00 
			
		
		
		
	Merge pull request #2704 from ianyfan/tablet-config
input: enable configuring tablets with libinput
This commit is contained in:
		
						commit
						5912be46c3
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
					@ -233,7 +233,8 @@ static void handle_new_input(struct wl_listener *listener, void *data) {
 | 
				
			||||||
	wlr_log(WLR_DEBUG, "adding device: '%s'",
 | 
						wlr_log(WLR_DEBUG, "adding device: '%s'",
 | 
				
			||||||
		input_device->identifier);
 | 
							input_device->identifier);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) {
 | 
						if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER ||
 | 
				
			||||||
 | 
								input_device->wlr_device->type == WLR_INPUT_DEVICE_TABLET_TOOL) {
 | 
				
			||||||
		input_manager_libinput_config_pointer(input_device);
 | 
							input_manager_libinput_config_pointer(input_device);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -393,7 +394,8 @@ void input_manager_apply_input_config(struct sway_input_manager *input,
 | 
				
			||||||
	wl_list_for_each(input_device, &input->devices, link) {
 | 
						wl_list_for_each(input_device, &input->devices, link) {
 | 
				
			||||||
		if (strcmp(input_device->identifier, input_config->identifier) == 0
 | 
							if (strcmp(input_device->identifier, input_config->identifier) == 0
 | 
				
			||||||
				|| wildcard) {
 | 
									|| wildcard) {
 | 
				
			||||||
			if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER) {
 | 
								if (input_device->wlr_device->type == WLR_INPUT_DEVICE_POINTER ||
 | 
				
			||||||
 | 
										input_device->wlr_device->type == WLR_INPUT_DEVICE_TABLET_TOOL) {
 | 
				
			||||||
				input_manager_libinput_config_pointer(input_device);
 | 
									input_manager_libinput_config_pointer(input_device);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue