view: replace view_has_children with view_is_transient_for

This is a much cleaner implementation but allows us to do the same
things.
This commit is contained in:
Jente Hidskes 2019-01-30 20:25:29 +01:00
parent 7de253386c
commit 5c403edc0b
5 changed files with 36 additions and 22 deletions

11
view.c
View file

@ -38,15 +38,8 @@ view_is_primary(struct cg_view *view)
}
bool
view_has_children(struct cg_server *server, struct cg_view *parent)
{
struct cg_view *child;
wl_list_for_each(child, &server->views, link) {
if (parent != child && parent->impl->is_parent(parent, child)) {
return true;
}
}
return false;
view_is_transient_for(struct cg_view *child, struct cg_view *parent) {
return child->impl->is_transient_for(child, parent);
}
void