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
+5 -1
View File
@@ -386,7 +386,11 @@ weston_desktop_xwayland_init(struct weston_desktop *desktop)
xwayland->desktop = desktop;
xwayland->client = weston_desktop_client_create(desktop, NULL, NULL, NULL, NULL, 0, 0);
weston_layer_init(&xwayland->layer, &compositor->cursor_layer.link);
weston_layer_init(&xwayland->layer, compositor);
/* We put this layer on top of regular shell surfaces, but hopefully
* below any UI the shell would add */
weston_layer_set_position(&xwayland->layer,
WESTON_LAYER_POSITION_NORMAL + 1);
compositor->xwayland = xwayland;
compositor->xwayland_interface = &weston_desktop_xwayland_interface;