From 2e2da0c950da9847e3ba13ce022abdfd55531fe5 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 18 Apr 2025 15:07:46 +0300 Subject: [PATCH] desktop-shell: Convert to wl_signal_emit_mutable Removes a destroy signal from input-panel as there no users for it. Signed-off-by: Marius Vlad --- desktop-shell/input-panel.c | 7 ++----- desktop-shell/shell.c | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c index 9b5d3b20a..07ce45e35 100644 --- a/desktop-shell/input-panel.c +++ b/desktop-shell/input-panel.c @@ -36,7 +36,6 @@ struct input_panel_surface { struct wl_resource *resource; - struct wl_signal destroy_signal; struct desktop_shell *shell; @@ -208,8 +207,6 @@ input_panel_committed(struct weston_surface *surface, static void destroy_input_panel_surface(struct input_panel_surface *input_panel_surface) { - wl_signal_emit(&input_panel_surface->destroy_signal, input_panel_surface); - wl_list_remove(&input_panel_surface->surface_destroy_listener.link); wl_list_remove(&input_panel_surface->link); @@ -263,8 +260,8 @@ create_input_panel_surface(struct desktop_shell *shell, input_panel_surface->surface = surface; input_panel_surface->view = weston_view_create(surface); - wl_signal_init(&input_panel_surface->destroy_signal); - input_panel_surface->surface_destroy_listener.notify = input_panel_handle_surface_destroy; + input_panel_surface->surface_destroy_listener.notify = + input_panel_handle_surface_destroy; wl_signal_add(&surface->destroy_signal, &input_panel_surface->surface_destroy_listener); diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index abc3479b1..e09d5e6db 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -153,7 +153,7 @@ desktop_shell_destroy_surface(struct shell_surface *shsurf) wl_list_remove(&shsurf->link); weston_view_destroy(shsurf->view); - wl_signal_emit(&shsurf->destroy_signal, shsurf); + wl_signal_emit_mutable(&shsurf->destroy_signal, shsurf); weston_surface_unref(shsurf->wsurface_anim_fade); if (shsurf->output_destroy_listener.notify) { @@ -4318,7 +4318,7 @@ force_kill_binding(struct weston_keyboard *keyboard, if (!focus_surface) return; - wl_signal_emit(&compositor->kill_signal, focus_surface); + wl_signal_emit_mutable(&compositor->kill_signal, focus_surface); client = wl_resource_get_client(focus_surface->resource); wl_client_get_credentials(client, &pid, NULL, NULL);