From a92504d8bf255322b2e00c249ab80c667b48c0b5 Mon Sep 17 00:00:00 2001 From: Silvan Jegen Date: Sun, 26 Jun 2022 13:48:08 +0200 Subject: [PATCH] dwl: don't destroy popup scene on unmap Instead we disable it and destroy it at destroy time. --- dwl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index d17c1a6..4376e54 100644 --- a/dwl.c +++ b/dwl.c @@ -2447,7 +2447,7 @@ static void handle_im_popup_unmap(struct wl_listener *listener, void *data) { wl_container_of(listener, popup, popup_unmap); input_popup_update(popup); - wlr_scene_node_destroy(popup->scene); + wlr_scene_node_set_enabled(popup->scene, 0); } static void handle_im_popup_destroy(struct wl_listener *listener, void *data) { @@ -2458,6 +2458,8 @@ static void handle_im_popup_destroy(struct wl_listener *listener, void *data) { wl_list_remove(&popup->popup_destroy.link); wl_list_remove(&popup->popup_unmap.link); wl_list_remove(&popup->popup_map.link); + wlr_scene_node_destroy(popup->scene); + free(popup); }