libweston: Position layers in an absolute way
Currently, layers’ order depends on the module loading order and it does
not survive runtime modifications (like shell locking/unlocking).
With this patch, modules can safely add their own layer at the expected
position in the stack, with runtime persistence.
v4 Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Acked-by: Daniel Stone <daniels@collabora.com>
[Pekka: fix three whitespace issues]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 60d05c4..ada7a7c 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2019,7 +2019,9 @@
wl_signal_init(&layout->surface_notification.configure_changed);
/* Add layout_layer at the last of weston_compositor.layer_list */
- weston_layer_init(&layout->layout_layer, ec->layer_list.prev);
+ weston_layer_init(&layout->layout_layer, ec);
+ weston_layer_set_position(&layout->layout_layer,
+ WESTON_LAYER_POSITION_NORMAL);
create_screen(ec);