Unified · Split
| @@ -676,9 +676,6 @@ handle_global(void *data, struct wl_registry *registry, uint32_t name, const cha · 675 unmodified lines | ||
| 676 | 676 | return; |
| 677 | 677 | wl->seat = wl_registry_bind(registry, name, &wl_seat_interface, 4); |
| 678 | 678 | wl_seat_add_listener(wl->seat, &seat_listener, wl); |
| 679 | − wl->data_device = wl_data_device_manager_get_data_device(wl->data_device_manager, wl->seat); | |
| 680 | − wl_data_device_add_listener(wl->data_device, &data_device_listener, wl); | |
| 681 | − wl->primsel_device = zwp_primary_selection_device_manager_v1_get_device(wl->primsel, wl->seat); | |
| 682 | 679 | } else if(strcmp(interface, wl_compositor_interface.name) == 0) { |
| 683 | 680 | wl->compositor = wl_registry_bind(registry, name, &wl_compositor_interface, 1); |
| 684 | 681 | } else if(strcmp(interface, xdg_wm_base_interface.name) == 0) { |
| @@ -750,6 +747,12 @@ wlsetcb(Wlwin *wl) · 65 unmodified lines | ||
| 750 | 747 | |
| 751 | 748 | cb = wl_surface_frame(wl->surface); |
| 752 | 749 | wl_callback_add_listener(cb, &wl_surface_frame_listener, wl); |
| 750 | + | |
| 751 | + if(wl->data_device_manager != nil && wl->seat != nil){ | |
| 752 | + wl->data_device = wl_data_device_manager_get_data_device(wl->data_device_manager, wl->seat); | |
| 753 | + wl_data_device_add_listener(wl->data_device, &data_device_listener, wl); | |
| 754 | + wl->primsel_device = zwp_primary_selection_device_manager_v1_get_device(wl->primsel, wl->seat); | |
| 755 | + } | |
| 753 | 756 | } |
| 754 | 757 | |
| 755 | 758 | void |