aboutsummaryrefslogtreecommitdiff
path: root/xwayland/shell.c
diff options
context:
space:
mode:
authorJiDe Zhang <zccrs@live.com>2023-09-08 21:36:56 +0800
committerSimon Ser <contact@emersion.fr>2023-10-06 10:04:11 +0200
commitca19014af011f5a6433fb6763fa1350c03a77f65 (patch)
tree88f3c8698a362bdfb53569132e25e5983a74df46 /xwayland/shell.c
parente58c7bb792adb6bd7fe24070648046bd3ffe8104 (diff)
xwayland: fix double free wlr_xwayland_shell_v1
Diffstat (limited to 'xwayland/shell.c')
-rw-r--r--xwayland/shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xwayland/shell.c b/xwayland/shell.c
index 9c5a9d20..1f7e11af 100644
--- a/xwayland/shell.c
+++ b/xwayland/shell.c
@@ -179,6 +179,7 @@ struct wlr_xwayland_shell_v1 *wlr_xwayland_shell_v1_create(
wl_list_init(&shell->surfaces);
wl_signal_init(&shell->events.new_surface);
+ wl_signal_init(&shell->events.destroy);
shell->display_destroy.notify = handle_display_destroy;
wl_display_add_destroy_listener(display, &shell->display_destroy);
@@ -193,6 +194,8 @@ void wlr_xwayland_shell_v1_destroy(struct wlr_xwayland_shell_v1 *shell) {
return;
}
+ wl_signal_emit_mutable(&shell->events.destroy, NULL);
+
struct wlr_xwayland_surface_v1 *xwl_surface, *tmp;
wl_list_for_each_safe(xwl_surface, tmp, &shell->surfaces, link) {
xwl_surface_destroy(xwl_surface);