From 102a6bd415d4b4071d96bffdfc7c92626eacf3b3 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Mon, 7 Jul 2025 05:59:40 +0900 Subject: [PATCH] input-method: use `NULL` when emitting signals --- include/wlr/types/wlr_input_method_v2.h | 6 +++--- types/wlr_input_method_v2.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/wlr/types/wlr_input_method_v2.h b/include/wlr/types/wlr_input_method_v2.h index 885b3fe80..aaafbf5f2 100644 --- a/include/wlr/types/wlr_input_method_v2.h +++ b/include/wlr/types/wlr_input_method_v2.h @@ -48,10 +48,10 @@ struct wlr_input_method_v2 { struct wl_list link; struct { - struct wl_signal commit; // struct wlr_input_method_v2 + struct wl_signal commit; struct wl_signal new_popup_surface; // struct wlr_input_popup_surface_v2 struct wl_signal grab_keyboard; // struct wlr_input_method_keyboard_grab_v2 - struct wl_signal destroy; // struct wlr_input_method_v2 + struct wl_signal destroy; } events; struct { @@ -95,7 +95,7 @@ struct wlr_input_method_manager_v2 { struct { struct wl_signal new_input_method; // struct wlr_input_method_v2 - struct wl_signal destroy; // struct wlr_input_method_manager_v2 + struct wl_signal destroy; } events; struct { diff --git a/types/wlr_input_method_v2.c b/types/wlr_input_method_v2.c index ed2a4ebeb..0a521df48 100644 --- a/types/wlr_input_method_v2.c +++ b/types/wlr_input_method_v2.c @@ -56,7 +56,7 @@ static void input_method_destroy(struct wlr_input_method_v2 *input_method) { popup_surface, tmp, &input_method->popup_surfaces, link) { popup_surface_destroy(popup_surface); } - wl_signal_emit_mutable(&input_method->events.destroy, input_method); + wl_signal_emit_mutable(&input_method->events.destroy, NULL); assert(wl_list_empty(&input_method->events.commit.listener_list)); assert(wl_list_empty(&input_method->events.new_popup_surface.listener_list)); @@ -102,7 +102,7 @@ static void im_commit(struct wl_client *client, struct wl_resource *resource, input_method->current = input_method->pending; input_method->pending = (struct wlr_input_method_v2_state){0}; - wl_signal_emit_mutable(&input_method->events.commit, input_method); + wl_signal_emit_mutable(&input_method->events.commit, NULL); } static void im_commit_string(struct wl_client *client, @@ -606,7 +606,7 @@ static void input_method_manager_bind(struct wl_client *wl_client, void *data, static void handle_display_destroy(struct wl_listener *listener, void *data) { struct wlr_input_method_manager_v2 *manager = wl_container_of(listener, manager, display_destroy); - wl_signal_emit_mutable(&manager->events.destroy, manager); + wl_signal_emit_mutable(&manager->events.destroy, NULL); assert(wl_list_empty(&manager->events.new_input_method.listener_list)); assert(wl_list_empty(&manager->events.destroy.listener_list));