compositor: keep track of the weston_layer a weston_view is in
This introduces a new struct, weston_layer_entry, which is now used
in place of wl_list to keep the link for the layer list in weston_view
and the head of the list in weston_layer.
weston_layer_entry also has a weston_layer*, which points to the layer
the view is in or, in the case the entry it's the head of the list, to
the layer itself.
diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c
index 104b9d9..4b65cbd 100644
--- a/desktop-shell/exposay.c
+++ b/desktop-shell/exposay.c
@@ -219,7 +219,7 @@
int last_row_removed = 0;
eoutput->num_surfaces = 0;
- wl_list_for_each(view, &workspace->layer.view_list, layer_link) {
+ wl_list_for_each(view, &workspace->layer.view_list.link, layer_link.link) {
if (!get_shell_surface(view->surface))
continue;
if (view->output != output)
@@ -272,7 +272,7 @@
eoutput->surface_size = output->height / 2;
i = 0;
- wl_list_for_each(view, &workspace->layer.view_list, layer_link) {
+ wl_list_for_each(view, &workspace->layer.view_list.link, layer_link.link) {
int pad;
pad = eoutput->surface_size + eoutput->padding_inner;