]> Dogcows Code - chaz/openbox/blobdiff - openbox/keytree.c
dont reparse the config file when the keyboard map changes. just rebind everything...
[chaz/openbox] / openbox / keytree.c
index fb26624d0732d88105c97094d036137d5d5fcf9d..714fffda60bc6bbccdfe0bbd46e74f732865a73a 100644 (file)
@@ -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;
This page took 0.025844 seconds and 4 git commands to generate.