]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Rename some handler functions to be more consistent
authortokyo4j <hrak1529@gmail.com>
Tue, 27 May 2025 07:11:49 +0000 (16:11 +0900)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 27 May 2025 11:13:51 +0000 (13:13 +0200)
src/layers.c
src/xdg.c

index ba756a527339dee1e1e88d3fbfa3fdeac6c17e7a..744282b31a0da774527b6240c804b66a9b0a69c8 100644 (file)
@@ -357,7 +357,7 @@ handle_map(struct wl_listener *listener, void *data)
 }
 
 static void
-popup_handle_destroy(struct wl_listener *listener, void *data)
+handle_popup_destroy(struct wl_listener *listener, void *data)
 {
        struct lab_layer_popup *popup =
                wl_container_of(listener, popup, destroy);
@@ -376,7 +376,7 @@ popup_handle_destroy(struct wl_listener *listener, void *data)
 }
 
 static void
-popup_handle_commit(struct wl_listener *listener, void *data)
+handle_popup_commit(struct wl_listener *listener, void *data)
 {
        struct lab_layer_popup *popup =
                wl_container_of(listener, popup, commit);
@@ -392,7 +392,7 @@ popup_handle_commit(struct wl_listener *listener, void *data)
 }
 
 static void
-popup_handle_reposition(struct wl_listener *listener, void *data)
+handle_popup_reposition(struct wl_listener *listener, void *data)
 {
        struct lab_layer_popup *popup =
                wl_container_of(listener, popup, reposition);
@@ -400,7 +400,7 @@ popup_handle_reposition(struct wl_listener *listener, void *data)
                &popup->output_toplevel_sx_box);
 }
 
-static void popup_handle_new_popup(struct wl_listener *listener, void *data);
+static void handle_popup_new_popup(struct wl_listener *listener, void *data);
 
 static struct lab_layer_popup *
 create_popup(struct server *server, struct wlr_xdg_popup *wlr_popup,
@@ -422,16 +422,16 @@ create_popup(struct server *server, struct wlr_xdg_popup *wlr_popup,
        node_descriptor_create(&popup->scene_tree->node,
                LAB_NODE_DESC_LAYER_POPUP, popup);
 
-       popup->destroy.notify = popup_handle_destroy;
+       popup->destroy.notify = handle_popup_destroy;
        wl_signal_add(&wlr_popup->events.destroy, &popup->destroy);
 
-       popup->new_popup.notify = popup_handle_new_popup;
+       popup->new_popup.notify = handle_popup_new_popup;
        wl_signal_add(&wlr_popup->base->events.new_popup, &popup->new_popup);
 
-       popup->commit.notify = popup_handle_commit;
+       popup->commit.notify = handle_popup_commit;
        wl_signal_add(&wlr_popup->base->surface->events.commit, &popup->commit);
 
-       popup->reposition.notify = popup_handle_reposition;
+       popup->reposition.notify = handle_popup_reposition;
        wl_signal_add(&wlr_popup->events.reposition, &popup->reposition);
 
        return popup;
@@ -439,7 +439,7 @@ create_popup(struct server *server, struct wlr_xdg_popup *wlr_popup,
 
 /* This popup's parent is a layer popup */
 static void
-popup_handle_new_popup(struct wl_listener *listener, void *data)
+handle_popup_new_popup(struct wl_listener *listener, void *data)
 {
        struct lab_layer_popup *lab_layer_popup =
                wl_container_of(listener, lab_layer_popup, new_popup);
index 465492045a4b6fdf1f8738658783bf210334912c..1c9a79dcb69d2ce26d37edf16ef78c5ecd5f7aac 100644 (file)
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -809,7 +809,7 @@ struct token_data {
 };
 
 static void
-xdg_activation_handle_token_destroy(struct wl_listener *listener, void *data)
+handle_xdg_activation_token_destroy(struct wl_listener *listener, void *data)
 {
        struct token_data *token_data = wl_container_of(listener, token_data, destroy);
        wl_list_remove(&token_data->destroy.link);
@@ -817,7 +817,7 @@ xdg_activation_handle_token_destroy(struct wl_listener *listener, void *data)
 }
 
 static void
-xdg_activation_handle_new_token(struct wl_listener *listener, void *data)
+handle_xdg_activation_new_token(struct wl_listener *listener, void *data)
 {
        struct wlr_xdg_activation_token_v1 *token = data;
        struct token_data *token_data = znew(*token_data);
@@ -825,12 +825,12 @@ xdg_activation_handle_new_token(struct wl_listener *listener, void *data)
        token_data->had_valid_seat = !!token->seat;
        token->data = token_data;
 
-       token_data->destroy.notify = xdg_activation_handle_token_destroy;
+       token_data->destroy.notify = handle_xdg_activation_token_destroy;
        wl_signal_add(&token->events.destroy, &token_data->destroy);
 }
 
 static void
-xdg_activation_handle_request(struct wl_listener *listener, void *data)
+handle_xdg_activation_request(struct wl_listener *listener, void *data)
 {
        const struct wlr_xdg_activation_v1_request_activate_event *event = data;
        struct token_data *token_data = event->token->data;
@@ -998,11 +998,11 @@ xdg_shell_init(struct server *server)
                exit(EXIT_FAILURE);
        }
 
-       server->xdg_activation_request.notify = xdg_activation_handle_request;
+       server->xdg_activation_request.notify = handle_xdg_activation_request;
        wl_signal_add(&server->xdg_activation->events.request_activate,
                &server->xdg_activation_request);
 
-       server->xdg_activation_new_token.notify = xdg_activation_handle_new_token;
+       server->xdg_activation_new_token.notify = handle_xdg_activation_new_token;
        wl_signal_add(&server->xdg_activation->events.new_token,
                &server->xdg_activation_new_token);
 }