X-Git-Url: http://git.openbox.org/?p=mikachu%2Fopenbox.git;a=blobdiff_plain;f=openbox%2Fconfig.c;h=f5ac1095292bafb83bbadc6433fb2c93b034e050;hp=b824822b55ae55bf51db421cc7fa07c6ec8a69da;hb=55e52ce1b26d3a5e736bee6095ac4c403cca15e9;hpb=1be6f076fe6ec6d4d5b5a5de294bd0eba5d3d37a diff --git a/openbox/config.c b/openbox/config.c index b824822..f5ac109 100644 --- a/openbox/config.c +++ b/openbox/config.c @@ -584,8 +584,23 @@ static void parse_mouse(xmlNodePtr node, gpointer d) while (nact) { ObActionsAct *action; - if ((action = actions_parse(nact))) - mouse_bind(buttonstr, cx, mact, action); + if ((action = actions_parse(nact))) { + gchar *p = buttonstr; + while (*p) { + gchar *s = strchr(p, ' '); + if (s) { + *s = '\0'; + } else { + s = p; + while (*++s); + s--; + } + mouse_bind(p, cx, mact, action); + actions_act_ref(action); /* ref the action for each binding */ + p = s+1; + } + actions_act_unref(action); /* remove the extra ref */ + } nact = obt_xml_find_node(nact->next, "action"); } g_free(buttonstr);