view: Update child view transforms from parent
weston_view_geometry_dirty() marks the passed-in view as dirty, as well as all of its children. weston_view_update_transform() updates the geometry of its ancestors, then itself. Users are required (for now) to call weston_view_update_transform() in order to not experience a disappointing amount of death-by-assert. Users do not have a pointer to child views which are magically materialised by the subsurface code. The end result is disappointing. But it is less disappointing if updating the transform for a view the user is actually aware exists, also updates the transform for all its children. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
0ff72e5374
commit
49b5df7f78
|
@ -1494,6 +1494,7 @@ WL_EXPORT void
|
|||
weston_view_update_transform(struct weston_view *view)
|
||||
{
|
||||
struct weston_view *parent = view->geometry.parent;
|
||||
struct weston_view *child;
|
||||
struct weston_layer *layer;
|
||||
pixman_region32_t mask;
|
||||
|
||||
|
@ -1539,6 +1540,11 @@ weston_view_update_transform(struct weston_view *view)
|
|||
|
||||
wl_signal_emit(&view->surface->compositor->transform_signal,
|
||||
view->surface);
|
||||
|
||||
wl_list_for_each(child, &view->geometry.child_list,
|
||||
geometry.parent_link) {
|
||||
weston_view_update_transform(child);
|
||||
}
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
|
|
Loading…
Reference in New Issue