diff --git a/include/action.h b/include/action.h index f11e4c11..a76aecf5 100644 --- a/include/action.h +++ b/include/action.h @@ -24,7 +24,7 @@ bool action_is_valid(struct action *action); void action_arg_add_str(struct action *action, const char *key, const char *value); -void action_arg_from_xml_node(struct action *action, char *nodename, char *content); +void action_arg_from_xml_node(struct action *action, const char *nodename, const char *content); bool actions_contain_toggle_keybinds(struct wl_list *action_list); diff --git a/src/action.c b/src/action.c index 35a29e7f..c04e1c54 100644 --- a/src/action.c +++ b/src/action.c @@ -159,7 +159,7 @@ action_arg_add_int(struct action *action, const char *key, int value) } void -action_arg_from_xml_node(struct action *action, char *nodename, char *content) +action_arg_from_xml_node(struct action *action, const char *nodename, const char *content) { assert(action); diff --git a/src/config/rcxml.c b/src/config/rcxml.c index f0af0b51..42f89442 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -847,7 +847,8 @@ load_default_key_bindings(void) wl_list_append(&k->actions, &action->link); if (key_combos[i].attribute && key_combos[i].value) { - action_arg_add_str(action, key_combos[i].attribute, key_combos[i].value); + action_arg_from_xml_node(action, + key_combos[i].attribute, key_combos[i].value); } } } @@ -956,7 +957,8 @@ load_default_mouse_bindings(void) * slightly more sophisticated approach will be needed. */ if (current->attribute && current->value) { - action_arg_add_str(action, current->attribute, current->value); + action_arg_from_xml_node(action, + current->attribute, current->value); } } wlr_log(WLR_DEBUG, "Loaded %u merged mousebinds", count);