summaryrefslogtreecommitdiff
path: root/desktop-shell/input-panel.c
diff options
context:
space:
mode:
authorQuentin Glidic <sardemff7+git@sardemff7.net>2016-12-17 13:40:51 +0100
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-01-17 16:50:18 +0200
commit82681571cf2407ed61bd1d29065583ddd4c2e525 (patch)
tree876f2e1d8b2094424c513d93490e11ed444dc462 /desktop-shell/input-panel.c
parent39d7e99a461dc43385381d465891bdcfbb67be5c (diff)
downloadweston-82681571cf2407ed61bd1d29065583ddd4c2e525.tar.gz
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>
Diffstat (limited to 'desktop-shell/input-panel.c')
-rw-r--r--desktop-shell/input-panel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c
index 58a4cd05..40a4092e 100644
--- a/desktop-shell/input-panel.c
+++ b/desktop-shell/input-panel.c
@@ -115,8 +115,8 @@ show_input_panels(struct wl_listener *listener, void *data)
shell->showing_input_panels = true;
if (!shell->locked)
- wl_list_insert(&shell->compositor->cursor_layer.link,
- &shell->input_panel_layer.link);
+ weston_layer_set_position(&shell->input_panel_layer,
+ WESTON_LAYER_POSITION_TOP_UI);
wl_list_for_each_safe(ipsurf, next,
&shell->input_panel.surfaces, link) {
@@ -141,7 +141,7 @@ hide_input_panels(struct wl_listener *listener, void *data)
shell->showing_input_panels = false;
if (!shell->locked)
- wl_list_remove(&shell->input_panel_layer.link);
+ weston_layer_unset_position(&shell->input_panel_layer);
wl_list_for_each_safe(view, next,
&shell->input_panel_layer.view_list.link,