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/tests/weston-test.c b/tests/weston-test.c
index eec2c3c..e4dd36f 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -596,7 +596,8 @@
return -1;
test->compositor = ec;
- weston_layer_init(&test->layer, &ec->cursor_layer.link);
+ weston_layer_init(&test->layer, ec);
+ weston_layer_set_position(&test->layer, WESTON_LAYER_POSITION_CURSOR - 1);
if (wl_global_create(ec->wl_display, &weston_test_interface, 1,
test, bind_test) == NULL)