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>
This commit is contained in:
Quentin Glidic
2016-12-17 13:40:51 +01:00
committed by Pekka Paalanen
parent 39d7e99a46
commit 82681571cf
10 changed files with 187 additions and 57 deletions
+2 -1
View File
@@ -596,7 +596,8 @@ module_init(struct weston_compositor *ec,
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)