summaryrefslogtreecommitdiff
path: root/openbox/keytree.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-19 23:59:40 -0500
committerDana Jansens <danakj@orodu.net>2008-01-19 23:59:40 -0500
commit3ae58f457bcdfa90b26dad4c9d192f045874ddae (patch)
tree23d603a47cfedc8e51cf36bf3480f83118b94710 /openbox/keytree.c
parent2b8b5da04b14af1639143cc332874c7e1a03a8bb (diff)
parent4b41ac8343efa21a959d81a4db8aea32e5960f10 (diff)
Merge branch 'backport'
Diffstat (limited to 'openbox/keytree.c')
-rw-r--r--openbox/keytree.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/openbox/keytree.c b/openbox/keytree.c
index fb26624d..714fffda 100644
--- a/openbox/keytree.c
+++ b/openbox/keytree.c
@@ -63,14 +63,18 @@ KeyBindingTree *tree_build(GList *keylist)
g_strdup(kit->data)); /* deep copy */
ret->first_child = p;
if (p != NULL) p->parent = ret;
- if (!translate_key(it->data, &ret->state, &ret->key)) {
- tree_destroy(ret);
- return NULL;
- }
+ translate_key(it->data, &ret->state, &ret->key);
}
return ret;
}
+void tree_rebind(KeyBindingTree *node) {
+ GList *it = g_list_last(node->keylist);
+ translate_key(it->data, &node->state, &node->key);
+ if (node->next_sibling) tree_rebind(node->next_sibling);
+ if (node->first_child) tree_rebind(node->first_child);
+}
+
void tree_assimilate(KeyBindingTree *node)
{
KeyBindingTree *a, *b, *tmp, *last;