I have double checked seat_handle_capabilities function used in several of wayland clients which never calls wl_pointer_destroy/wl_keyboard_destroy/wl_touch_destroy with every combination possible. Though touch capability is not present it still call wl_seat_get_touch. Thanks.
Sorry, what is the problem here? Whenever a wl_seat changes capabilities, e.g. a the first keyboard gets hot-plugged, or the last pointer device gets hot-unplugged, wl_seat sends a capability notification with the new feature bits appropriately set or cleared. Clients should destroy e.g. wl_pointer if the pointer capability disappears. To me it looks like the code does exactly that. But it *is* missing calls like wl_pointer_release, but I am unsure if that is the bug you are reporting here.
Not sure what the actual bug is here.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.