wayland/surface: Simplify is_child & is_sibling

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2525>
This commit is contained in:
Michel Dänzer 2022-06-17 16:29:34 +02:00 committed by Michel Dänzer
parent f685567afe
commit ddb7f84291

View File

@ -95,20 +95,14 @@ static gboolean
is_child (MetaWaylandSurface *surface,
MetaWaylandSurface *sibling)
{
if (surface->sub.parent == sibling)
return TRUE;
else
return FALSE;
return surface->sub.parent == sibling;
}
static gboolean
is_sibling (MetaWaylandSurface *surface,
MetaWaylandSurface *sibling)
{
if (surface->sub.parent == sibling->sub.parent)
return TRUE;
else
return FALSE;
return surface->sub.parent == sibling->sub.parent;
}
static gboolean