mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	Get rid of wl_client_add_surface() special case
This commit is contained in:
		
							parent
							
								
									e9d37bdc5f
								
							
						
					
					
						commit
						f66d0f4e14
					
				
					 3 changed files with 8 additions and 24 deletions
				
			
		
							
								
								
									
										10
									
								
								compositor.c
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								compositor.c
									
										
									
									
									
								
							| 
						 | 
					@ -635,8 +635,14 @@ compositor_create_surface(struct wl_client *client,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	wl_list_insert(ec->surface_list.prev, &surface->link);
 | 
						wl_list_insert(ec->surface_list.prev, &surface->link);
 | 
				
			||||||
	surface->base.base.destroy = destroy_surface;
 | 
						surface->base.base.destroy = destroy_surface;
 | 
				
			||||||
	wl_client_add_surface(client, &surface->base,
 | 
					
 | 
				
			||||||
			      &surface_interface, id);
 | 
						surface->base.base.base.id = id;
 | 
				
			||||||
 | 
						surface->base.base.base.interface = &wl_surface_interface;
 | 
				
			||||||
 | 
						surface->base.base.base.implementation =
 | 
				
			||||||
 | 
							(void (**)(void)) &surface_interface;
 | 
				
			||||||
 | 
						surface->base.client = client;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						wl_client_add_resource(client, &surface->base.base);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					static void
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -262,22 +262,6 @@ wl_client_destroy(struct wl_client *client)
 | 
				
			||||||
	free(client);
 | 
						free(client);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
WL_EXPORT int
 | 
					 | 
				
			||||||
wl_client_add_surface(struct wl_client *client,
 | 
					 | 
				
			||||||
		      struct wl_surface *surface,
 | 
					 | 
				
			||||||
		      const struct wl_surface_interface *implementation, 
 | 
					 | 
				
			||||||
		      uint32_t id)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	surface->base.base.id = id;
 | 
					 | 
				
			||||||
	surface->base.base.interface = &wl_surface_interface;
 | 
					 | 
				
			||||||
	surface->base.base.implementation = (void (**)(void)) implementation;
 | 
					 | 
				
			||||||
	surface->client = client;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	wl_client_add_resource(client, &surface->base);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	return 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
WL_EXPORT void
 | 
					WL_EXPORT void
 | 
				
			||||||
wl_client_send_acknowledge(struct wl_client *client,
 | 
					wl_client_send_acknowledge(struct wl_client *client,
 | 
				
			||||||
			   struct wl_compositor *compositor,
 | 
								   struct wl_compositor *compositor,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -156,12 +156,6 @@ wl_display_set_compositor(struct wl_display *display,
 | 
				
			||||||
			  struct wl_compositor *compositor,
 | 
								  struct wl_compositor *compositor,
 | 
				
			||||||
			  const struct wl_compositor_interface *implementation);
 | 
								  const struct wl_compositor_interface *implementation);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int
 | 
					 | 
				
			||||||
wl_client_add_surface(struct wl_client *client,
 | 
					 | 
				
			||||||
		      struct wl_surface *surface,
 | 
					 | 
				
			||||||
		      const struct wl_surface_interface *implementation, 
 | 
					 | 
				
			||||||
		      uint32_t id);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
wl_client_send_acknowledge(struct wl_client *client,
 | 
					wl_client_send_acknowledge(struct wl_client *client,
 | 
				
			||||||
			   struct wl_compositor *compositor,
 | 
								   struct wl_compositor *compositor,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue