mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-07 20:08:25 +02:00
surface: Don't create new views in view_list_add()
Now we create subsurface views both when linking to the parent subsurface, and when creating new views for the parent surface, we no longer need to magically materialise new views when building the view list. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
aac90fe400
commit
57cd2483f9
1 changed files with 4 additions and 10 deletions
|
|
@ -3084,17 +3084,11 @@ view_list_add_subsurface_view(struct weston_compositor *compositor,
|
|||
}
|
||||
}
|
||||
|
||||
if (view) {
|
||||
/* Put it back in the surface's list of views */
|
||||
wl_list_remove(&view->surface_link);
|
||||
wl_list_insert(&sub->surface->views, &view->surface_link);
|
||||
} else {
|
||||
view = weston_view_create_internal(sub->surface);
|
||||
weston_view_set_transform_parent(view, parent);
|
||||
weston_view_set_rel_position(view, sub->position.offset);
|
||||
}
|
||||
assert(view);
|
||||
/* Put it back in the surface's list of views */
|
||||
wl_list_remove(&view->surface_link);
|
||||
wl_list_insert(&sub->surface->views, &view->surface_link);
|
||||
|
||||
view->parent_view = parent;
|
||||
weston_view_update_transform(view);
|
||||
view->is_mapped = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue