From 953e8a4f9d8b4ff93e9de7e848c6ef9610a06674 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Thu, 24 Feb 2022 02:16:19 +0100 Subject: [PATCH] [style] rename action() to actions_run() --- include/action.h | 2 +- src/action.c | 3 ++- src/cursor.c | 6 +++--- src/keyboard.c | 2 +- src/menu/menu.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/include/action.h b/include/action.h index 44a16fd2..b23a0ec9 100644 --- a/include/action.h +++ b/include/action.h @@ -14,7 +14,7 @@ struct action { struct action *action_create(const char *action_name); void action_list_free(struct wl_list *action_list); -void action(struct view *activator, struct server *server, +void actions_run(struct view *activator, struct server *server, struct wl_list *actions, uint32_t resize_edges); #endif diff --git a/src/action.c b/src/action.c index 65aee0dc..a4376650 100644 --- a/src/action.c +++ b/src/action.c @@ -129,7 +129,8 @@ activator_or_focused_view(struct view *activator, struct server *server) } void -action(struct view *activator, struct server *server, struct wl_list *actions, uint32_t resize_edges) +actions_run(struct view *activator, struct server *server, + struct wl_list *actions, uint32_t resize_edges) { if (!actions) { wlr_log(WLR_ERROR, "empty actions"); diff --git a/src/cursor.c b/src/cursor.c index ef158cf4..5203a56c 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -261,7 +261,7 @@ process_cursor_motion(struct server *server, uint32_t time) } mousebind->pressed_in_context = false; - action(NULL, server, &mousebind->actions, resize_edges); + actions_run(NULL, server, &mousebind->actions, resize_edges); } } @@ -517,7 +517,7 @@ handle_release_mousebinding(struct view *view, struct server *server, } activated_any = true; activated_any_frame |= mousebind->context == LAB_SSD_FRAME; - action(view, server, &mousebind->actions, resize_edges); + actions_run(view, server, &mousebind->actions, resize_edges); } } /* @@ -599,7 +599,7 @@ handle_press_mousebinding(struct view *view, struct server *server, } activated_any = true; activated_any_frame |= mousebind->context == LAB_SSD_FRAME; - action(view, server, &mousebind->actions, resize_edges); + actions_run(view, server, &mousebind->actions, resize_edges); } } return activated_any && activated_any_frame; diff --git a/src/keyboard.c b/src/keyboard.c index 88c356b5..7776c3e7 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -70,7 +70,7 @@ handle_keybinding(struct server *server, uint32_t modifiers, xkb_keysym_t sym) for (size_t i = 0; i < keybind->keysyms_len; i++) { if (xkb_keysym_to_lower(sym) == keybind->keysyms[i]) { wlr_keyboard_set_repeat_info(kb, 0, 0); - action(NULL, server, &keybind->actions, 0); + actions_run(NULL, server, &keybind->actions, 0); return true; } } diff --git a/src/menu/menu.c b/src/menu/menu.c index beb85c58..1b7f9459 100644 --- a/src/menu/menu.c +++ b/src/menu/menu.c @@ -574,7 +574,7 @@ menu_call_actions(struct menu *menu, struct wlr_scene_node *node) /* ..but it just opens a submenu */ return false; } - action(NULL, menu->server, &menu->selection.item->actions, 0); + actions_run(NULL, menu->server, &menu->selection.item->actions, 0); menu_close(menu->server->menu_current); menu->server->menu_current = NULL; return true; -- 2.52.0