mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-08 07:48:07 +02:00
libweston-desktop: don't try to move child surfaces to not existing layer
The parent surface may not be on a layer. In that case, remove all child surfaces from their current layer as well. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
94dd926b99
commit
6e88a851a4
1 changed files with 6 additions and 2 deletions
|
|
@ -456,8 +456,12 @@ weston_desktop_view_propagate_layer(struct weston_desktop_view *view)
|
|||
/* Move each child to the same layer, immediately in front of its
|
||||
* parent. */
|
||||
wl_list_for_each_reverse(child, &view->children_list, children_link) {
|
||||
struct weston_layer_entry *child_pos =
|
||||
wl_container_of(parent_pos->prev, child_pos, link);
|
||||
struct weston_layer_entry *child_pos;
|
||||
|
||||
if (view->view->layer_link.layer)
|
||||
child_pos = wl_container_of(parent_pos->prev, child_pos, link);
|
||||
else
|
||||
child_pos = NULL;
|
||||
|
||||
weston_view_move_to_layer(child->view, child_pos);
|
||||
weston_desktop_view_propagate_layer(child);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue