mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	tablet-v2: fix pad and tool object versions
These were hardcoded to 1. Instead, create the resource with the version of the parent object.
This commit is contained in:
		
							parent
							
								
									57b70a478c
								
							
						
					
					
						commit
						ea585dba0f
					
				
					 2 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -306,8 +306,9 @@ void add_tablet_pad_client(struct wlr_tablet_seat_client_v2 *seat,
 | 
			
		|||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	client->resource =
 | 
			
		||||
		wl_resource_create(seat->wl_client, &zwp_tablet_pad_v2_interface, 1, 0);
 | 
			
		||||
	uint32_t version = wl_resource_get_version(seat->resource);
 | 
			
		||||
	client->resource = wl_resource_create(seat->wl_client,
 | 
			
		||||
		&zwp_tablet_pad_v2_interface, version, 0);
 | 
			
		||||
	if (!client->resource) {
 | 
			
		||||
		wl_client_post_no_memory(seat->wl_client);
 | 
			
		||||
		free(client->groups);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -115,8 +115,9 @@ void add_tablet_tool_client(struct wlr_tablet_seat_client_v2 *seat,
 | 
			
		|||
	client->tool = tool;
 | 
			
		||||
	client->seat = seat;
 | 
			
		||||
 | 
			
		||||
	client->resource =
 | 
			
		||||
		wl_resource_create(seat->wl_client, &zwp_tablet_tool_v2_interface, 1, 0);
 | 
			
		||||
	uint32_t version = wl_resource_get_version(seat->resource);
 | 
			
		||||
	client->resource = wl_resource_create(seat->wl_client,
 | 
			
		||||
		&zwp_tablet_tool_v2_interface, version, 0);
 | 
			
		||||
	if (!client->resource) {
 | 
			
		||||
		free(client);
 | 
			
		||||
		return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue