From e056153bf45ba66b48ec7db3c6f5676a585d7f6e Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 30 Sep 2024 16:03:12 +0300 Subject: [PATCH] desktop-shell: Don't attempt to re-add the view to panel layer This change fixes a side-effect of weston_view_move_to_layer helper which would basically unmap the view because the layer entry list is no longer visible. Only add the view to panel layer the first time. Fixes: #956 Signed-off-by: Marius Vlad (cherry picked from commit 217fb308471b16f43e2945c4bcfe17c3b98980fe) --- desktop-shell/shell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 69e72464..0801b94c 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2895,13 +2895,14 @@ panel_committed(struct weston_surface *es, weston_surface_map(es); assert(wl_list_empty(&es->views)); sh_output->panel_view = weston_view_create(es); + + weston_view_move_to_layer(sh_output->panel_view, + &shell->panel_layer.view_list); } assert(sh_output->panel_view); pos = weston_coord_global_add(output->pos, sh_output->panel_offset); weston_view_set_position(sh_output->panel_view, pos); - weston_view_move_to_layer(sh_output->panel_view, - &shell->panel_layer.view_list); } static void