X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fkeytree.c;h=56cc96d41baf767dac67e8f9152e2fcb98475c60;hb=12ca673de556b341588a7f67fb2b9417c1e91d6b;hp=fb26624d0732d88105c97094d036137d5d5fcf9d;hpb=780d1b0961e2eed5fea4645b4398fafb4adad73a;p=chaz%2Fopenbox diff --git a/openbox/keytree.c b/openbox/keytree.c index fb26624d..56cc96d4 100644 --- a/openbox/keytree.c +++ b/openbox/keytree.c @@ -63,10 +63,7 @@ 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; } @@ -135,16 +132,15 @@ KeyBindingTree *tree_find(KeyBindingTree *search, gboolean *conflict) gboolean tree_chroot(KeyBindingTree *tree, GList *keylist) { 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); - } + 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; }