@ -5828,6 +5828,29 @@ display_add_input(struct display *d, uint32_t id, int display_seat_version)
keyboard_repeat_func ) ;
keyboard_repeat_func ) ;
}
}
static void
display_add_data_device ( struct display * d , uint32_t id , int ddm_version )
{
struct input * input ;
d - > data_device_manager_version = MIN ( ddm_version , 3 ) ;
d - > data_device_manager =
wl_registry_bind ( d - > registry , id ,
& wl_data_device_manager_interface ,
d - > data_device_manager_version ) ;
wl_list_for_each ( input , & d - > input_list , link ) {
if ( ! input - > data_device ) {
input - > data_device =
wl_data_device_manager_get_data_device ( d - > data_device_manager ,
input - > seat ) ;
wl_data_device_add_listener ( input - > data_device ,
& data_device_listener ,
input ) ;
}
}
}
static void
static void
input_destroy ( struct input * input )
input_destroy ( struct input * input )
{
{
@ -5932,11 +5955,7 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id,
d - > shm = wl_registry_bind ( registry , id , & wl_shm_interface , 1 ) ;
d - > shm = wl_registry_bind ( registry , id , & wl_shm_interface , 1 ) ;
wl_shm_add_listener ( d - > shm , & shm_listener , d ) ;
wl_shm_add_listener ( d - > shm , & shm_listener , d ) ;
} else if ( strcmp ( interface , " wl_data_device_manager " ) = = 0 ) {
} else if ( strcmp ( interface , " wl_data_device_manager " ) = = 0 ) {
d - > data_device_manager_version = MIN ( version , 3 ) ;
display_add_data_device ( d , id , version ) ;
d - > data_device_manager =
wl_registry_bind ( registry , id ,
& wl_data_device_manager_interface ,
d - > data_device_manager_version ) ;
} else if ( strcmp ( interface , " xdg_wm_base " ) = = 0 ) {
} else if ( strcmp ( interface , " xdg_wm_base " ) = = 0 ) {
d - > xdg_shell = wl_registry_bind ( registry , id ,
d - > xdg_shell = wl_registry_bind ( registry , id ,
& xdg_wm_base_interface , 1 ) ;
& xdg_wm_base_interface , 1 ) ;