From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Fri, 6 Jan 2023 17:44:13 +0000 (+0100) Subject: src/action.c: Improve debugging by adding action argument to debug log X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=b12b6b320e0889b0883485e28ba8e28b2cf773aa;p=proto%2Flabwc.git src/action.c: Improve debugging by adding action argument to debug log --- diff --git a/src/action.c b/src/action.c index 622f9731..c191bdbd 100644 --- a/src/action.c +++ b/src/action.c @@ -253,12 +253,18 @@ actions_run(struct view *activator, struct server *server, struct action *action; struct action_arg *arg; wl_list_for_each(action, actions, link) { - wlr_log(WLR_DEBUG, "Handling action %s (%u)", - action_names[action->type], action->type); - /* Get arg now so we don't have to repeat every time we only need one */ arg = action_get_first_arg(action); + if (arg && arg->type == LAB_ACTION_ARG_STR) { + wlr_log(WLR_DEBUG, "Handling action %u: %s %s", + action->type, action_names[action->type], + action_str_from_arg(arg)); + } else { + wlr_log(WLR_DEBUG, "Handling action %u: %s", + action->type, action_names[action->type]); + } + /* * Refetch view because it may have been changed due to the * previous action