summaryrefslogtreecommitdiff
path: root/wayland-util.h
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-07-12 17:06:06 -0400
committerKristian Høgsberg <krh@bitplanet.net>2010-07-12 17:06:06 -0400
commit747638b46be785d2e00d00cae1030518193858a7 (patch)
tree07cee334c3d87e3cfc0848cab39f80ae57614400 /wayland-util.h
parentf252d6a98e75236a4059fb8ff6579ddad2e0e8aa (diff)
Fix window picking order
Diffstat (limited to 'wayland-util.h')
-rw-r--r--wayland-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/wayland-util.h b/wayland-util.h
index bc9d89b6..6ccc56a1 100644
--- a/wayland-util.h
+++ b/wayland-util.h
@@ -98,6 +98,11 @@ int wl_list_empty(struct wl_list *list);
&pos->member != (head); \
pos = __container_of(pos->member.next, pos, member))
+#define wl_list_for_each_reverse(pos, head, member) \
+ for (pos = __container_of((head)->prev, pos, member); \
+ &pos->member != (head); \
+ pos = __container_of(pos->member.prev, pos, member))
+
struct wl_array {
uint32_t size;
uint32_t alloc;