refactor <mouse> xml parsing to match rest of xml parsing

This commit is contained in:
alexander bryan 2021-08-30 22:03:41 -04:00 committed by Johan Malm
parent 92891b4dfa
commit 10a685a0e4
2 changed files with 124 additions and 217 deletions

View file

@ -81,7 +81,9 @@ mousebind_create(const char* context_str, const char* mouse_button_str,
m->button = button;
m->mouse_action = action_mouse_did;
m->action = strdup(action); /* TODO: replace with strndup? */
m->command = strdup(command);
if(command && !strcasecmp(action, "Execute")) {
m->command = strdup(command);
}
return m;