]> Dogcows Code - chaz/openbox/blobdiff - openbox/config.c
place the client menu at the top left of the window when opening it with a key binding.
[chaz/openbox] / openbox / config.c
index aadc4389f5b7faec7439d5c8676e37d01e04c401..f8b3fd95449bd1de7bb68fc8de76bde8f04e27ce 100644 (file)
@@ -278,17 +278,18 @@ static void parse_key(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 
     if (!parse_attr_string("key", node, &key))
         return;
+
     parse_attr_bool("chroot", node, &is_chroot);
 
     keylist = g_list_append(keylist, key);
 
-    /* a node either contains actions or key bindings */
     if ((n = parse_find_node("keybind", node->children))) {
         while (n) {
             parse_key(i, doc, n, keylist);
             n = parse_find_node("keybind", n->next);
         }
-    } else if ((n = parse_find_node("action", node->children))) {
+    }
+    else if ((n = parse_find_node("action", node->children))) {
         while (n) {
             ObAction *action;
             
@@ -304,9 +305,6 @@ static void parse_key(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
 
     g_free(key);
     keylist = g_list_delete_link(keylist, g_list_last(keylist));
-
-    /* go to next sibling */
-    if (node->next) parse_key(i, doc, node->next, keylist);
 }
 
 static void parse_keyboard(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
@@ -325,7 +323,10 @@ static void parse_keyboard(ObParseInst *i, xmlDocPtr doc, xmlNodePtr node,
     }
 
     if ((n = parse_find_node("keybind", node->children)))
-        parse_key(i, doc, n, NULL);
+        while (n) {
+            parse_key(i, doc, n, NULL);
+            n = parse_find_node("keybind", n->next);
+        }
 }
 
 /*
This page took 0.022203 seconds and 4 git commands to generate.