mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	seat: fallback to v6 if libwayland 1.17 isn't available
See https://github.com/swaywm/wlroots/pull/1675#issuecomment-487300445
This commit is contained in:
		
							parent
							
								
									d7ef3a1f38
								
							
						
					
					
						commit
						a656e486f4
					
				
					 1 changed files with 6 additions and 1 deletions
				
			
		| 
						 | 
					@ -254,8 +254,13 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
 | 
				
			||||||
	seat->touch_state.seat = seat;
 | 
						seat->touch_state.seat = seat;
 | 
				
			||||||
	wl_list_init(&seat->touch_state.touch_points);
 | 
						wl_list_init(&seat->touch_state.touch_points);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// TODO: always use SEAT_VERSION (requires libwayland 1.17)
 | 
				
			||||||
 | 
						uint32_t version = SEAT_VERSION;
 | 
				
			||||||
 | 
						if (wl_seat_interface.version < SEAT_VERSION) {
 | 
				
			||||||
 | 
							version = wl_seat_interface.version;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	seat->global = wl_global_create(display, &wl_seat_interface,
 | 
						seat->global = wl_global_create(display, &wl_seat_interface,
 | 
				
			||||||
		SEAT_VERSION, seat, seat_handle_bind);
 | 
							version, seat, seat_handle_bind);
 | 
				
			||||||
	if (seat->global == NULL) {
 | 
						if (seat->global == NULL) {
 | 
				
			||||||
		free(touch_grab);
 | 
							free(touch_grab);
 | 
				
			||||||
		free(pointer_grab);
 | 
							free(pointer_grab);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue