mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-03 01:41:28 -05:00
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:
parent
7de253386c
commit
5c403edc0b
5 changed files with 36 additions and 22 deletions
11
view.c
11
view.c
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue