]> git.sur5r.net Git - i3/i3/blobdiff - include/util.h
Merge branch 'master' into next
[i3/i3] / include / util.h
index 0e48843cfb36b3d9f8f280749dddc464f0b51917..edc51d812de74580d6387aca300a70a5e4c597df 100644 (file)
     for (Con *child = (Con*)-1; (child == (Con*)-1) && ((child = 0), true);) \
         TAILQ_FOREACH(child, &((head)->nodes_head), nodes)
 
+#define NODES_FOREACH_REVERSE(head) \
+    for (Con *child = (Con*)-1; (child == (Con*)-1) && ((child = 0), true);) \
+        TAILQ_FOREACH_REVERSE(child, &((head)->nodes_head), nodes_head, nodes)
+
 /* greps the ->nodes of the given head and returns the first node that matches the given condition */
 #define GREP_FIRST(dest, head, condition) \
     NODES_FOREACH(head) { \