From f580112dcabe0de4cf3d115a4e1cb74b87efc75c Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 30 May 2018 09:23:24 +0100 Subject: [PATCH] virtual-keyboard: fix wlr_virtual_keyboard_manager_v1_destroy --- types/wlr_virtual_keyboard_v1.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/types/wlr_virtual_keyboard_v1.c b/types/wlr_virtual_keyboard_v1.c index 0673f394..49abde7f 100644 --- a/types/wlr_virtual_keyboard_v1.c +++ b/types/wlr_virtual_keyboard_v1.c @@ -231,6 +231,16 @@ struct wlr_virtual_keyboard_manager_v1* void wlr_virtual_keyboard_manager_v1_destroy( struct wlr_virtual_keyboard_manager_v1 *manager) { + wl_list_remove(&manager->display_destroy.link); wl_global_destroy(manager->global); + struct wl_resource *resource, *resource_tmp; + wl_resource_for_each_safe(resource, resource_tmp, &manager->resources) { + wl_resource_destroy(resource); + } + struct wlr_virtual_keyboard_v1 *keyboard, *keyboard_tmp; + wl_list_for_each_safe(keyboard, keyboard_tmp, &manager->virtual_keyboards, + link) { + wl_resource_destroy(keyboard->resource); + } free(manager); }