summaryrefslogtreecommitdiff
path: root/openbox/keytree.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-04-26 02:10:15 +0000
committerDana Jansens <danakj@orodu.net>2007-04-26 02:10:15 +0000
commit8c68c9ab0f75514ee4f0336e566ac2c02ac20b65 (patch)
tree8dd8bc2a3cf2d0a8e7faa7ca6d6076ad48e8fcce /openbox/keytree.c
parentb6d2529acb6e31efbf8c7791e44905a1712da891 (diff)
fixes for new keybindings stuff/chroot/parsing
Diffstat (limited to 'openbox/keytree.c')
-rw-r--r--openbox/keytree.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/openbox/keytree.c b/openbox/keytree.c
index b26a4da7..202dd32c 100644
--- a/openbox/keytree.c
+++ b/openbox/keytree.c
@@ -133,16 +133,16 @@ KeyBindingTree *tree_find(KeyBindingTree *search, gboolean *conflict)
gboolean tree_chroot(KeyBindingTree *tree, GList *keylist)
{
- if (keylist == NULL) {
- tree->chroot = TRUE;
- return TRUE;
- } else {
- guint key, state;
- if (translate_key(keylist->data, &state, &key)) {
- while (tree != NULL && !(tree->state == state && tree->key == key))
- tree = tree->next_sibling;
- if (tree != NULL)
- return tree_chroot(tree, keylist->next);
+ guint key, state;
+ if (translate_key(keylist->data, &state, &key)) {
+ while (tree != NULL && !(tree->state == state && tree->key == key))
+ tree = tree->next_sibling;
+ if (tree != NULL) {
+ if (keylist->next == NULL) {
+ tree->chroot = TRUE;
+ return TRUE;
+ } else
+ return tree_chroot(tree->first_child, keylist->next);
}
}
return FALSE;