From 8c68c9ab0f75514ee4f0336e566ac2c02ac20b65 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 26 Apr 2007 02:10:15 +0000 Subject: fixes for new keybindings stuff/chroot/parsing --- openbox/keytree.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'openbox/keytree.c') 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; -- cgit v1.2.3