mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
seat: fix keyboard/pointer/touch resource destroy
We need to always unlink the resource, even if it's already inert. seat_client_destroy_*() may be called multiple times on the same resource. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3638
This commit is contained in:
parent
c4d4409deb
commit
1e68e1f661
3 changed files with 0 additions and 15 deletions
|
@ -473,11 +473,6 @@ void seat_client_create_inert_keyboard(struct wl_client *client,
|
|||
}
|
||||
|
||||
void seat_client_destroy_keyboard(struct wl_resource *resource) {
|
||||
struct wlr_seat_client *seat_client =
|
||||
seat_client_from_keyboard_resource(resource);
|
||||
if (seat_client == NULL) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(wl_resource_get_link(resource));
|
||||
wl_list_init(wl_resource_get_link(resource));
|
||||
wl_resource_set_user_data(resource, NULL);
|
||||
|
|
|
@ -553,11 +553,6 @@ void seat_client_create_inert_pointer(struct wl_client *client,
|
|||
}
|
||||
|
||||
void seat_client_destroy_pointer(struct wl_resource *resource) {
|
||||
struct wlr_seat_client *seat_client =
|
||||
wlr_seat_client_from_pointer_resource(resource);
|
||||
if (seat_client == NULL) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(wl_resource_get_link(resource));
|
||||
wl_list_init(wl_resource_get_link(resource));
|
||||
wl_resource_set_user_data(resource, NULL);
|
||||
|
|
|
@ -454,11 +454,6 @@ void seat_client_create_inert_touch(struct wl_client *client, uint32_t version,
|
|||
}
|
||||
|
||||
void seat_client_destroy_touch(struct wl_resource *resource) {
|
||||
struct wlr_seat_client *seat_client =
|
||||
seat_client_from_touch_resource(resource);
|
||||
if (seat_client == NULL) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(wl_resource_get_link(resource));
|
||||
wl_list_init(wl_resource_get_link(resource));
|
||||
wl_resource_set_user_data(resource, NULL);
|
||||
|
|
Loading…
Reference in a new issue