mirror of
				https://gitlab.freedesktop.org/wayland/wayland.git
				synced 2025-11-03 09:01:42 -05:00 
			
		
		
		
	wayland-server: Add destroy signal to wl_seat
Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
This commit is contained in:
		
							parent
							
								
									f36f32a0e0
								
							
						
					
					
						commit
						1432bd62df
					
				
					 2 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -622,6 +622,8 @@ wl_seat_init(struct wl_seat *seat)
 | 
			
		|||
{
 | 
			
		||||
	memset(seat, 0, sizeof *seat);
 | 
			
		||||
 | 
			
		||||
	wl_signal_init(&seat->destroy_signal);
 | 
			
		||||
 | 
			
		||||
	seat->selection_data_source = NULL;
 | 
			
		||||
	wl_list_init(&seat->base_resource_list);
 | 
			
		||||
	wl_signal_init(&seat->selection_signal);
 | 
			
		||||
| 
						 | 
				
			
			@ -632,6 +634,8 @@ wl_seat_init(struct wl_seat *seat)
 | 
			
		|||
WL_EXPORT void
 | 
			
		||||
wl_seat_release(struct wl_seat *seat)
 | 
			
		||||
{
 | 
			
		||||
	wl_signal_emit(&seat->destroy_signal, seat);
 | 
			
		||||
 | 
			
		||||
	if (seat->pointer)
 | 
			
		||||
		wl_pointer_release(seat->pointer);
 | 
			
		||||
	if (seat->keyboard)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -294,6 +294,7 @@ struct wl_touch {
 | 
			
		|||
 | 
			
		||||
struct wl_seat {
 | 
			
		||||
	struct wl_list base_resource_list;
 | 
			
		||||
	struct wl_signal destroy_signal;
 | 
			
		||||
 | 
			
		||||
	struct wl_pointer *pointer;
 | 
			
		||||
	struct wl_keyboard *keyboard;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue