mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	backend/wayland: Use seat name in input names
This commit is contained in:
		
							parent
							
								
									70ffda3ea3
								
							
						
					
					
						commit
						44c4773d58
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
					@ -448,7 +448,11 @@ struct wlr_wl_input_device *create_wl_input_device(
 | 
				
			||||||
	struct wlr_input_device *wlr_dev = &dev->wlr_input_device;
 | 
						struct wlr_input_device *wlr_dev = &dev->wlr_input_device;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unsigned int vendor = 0, product = 0;
 | 
						unsigned int vendor = 0, product = 0;
 | 
				
			||||||
	const char *name = "wayland";
 | 
					
 | 
				
			||||||
 | 
						size_t name_size = 8 + strlen(seat->name) + 1;
 | 
				
			||||||
 | 
						char name[name_size];
 | 
				
			||||||
 | 
						(void) snprintf(name, name_size, "wayland-%s", seat->name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wlr_input_device_init(wlr_dev, type, &input_device_impl, name, vendor,
 | 
						wlr_input_device_init(wlr_dev, type, &input_device_impl, name, vendor,
 | 
				
			||||||
		product);
 | 
							product);
 | 
				
			||||||
	wl_list_insert(&seat->backend->devices, &wlr_dev->link);
 | 
						wl_list_insert(&seat->backend->devices, &wlr_dev->link);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue