[mutter] wayland/surface: Simplify is_child & is_sibling
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland/surface: Simplify is_child & is_sibling
- Date: Thu, 21 Jul 2022 20:48:40 +0000 (UTC)
commit ddb7f842911a3a9d7296cecb2bba7638c264c9a9
Author: Michel Dänzer <mdaenzer redhat com>
Date: Fri Jun 17 16:29:34 2022 +0200
wayland/surface: Simplify is_child & is_sibling
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2525>
src/wayland/meta-wayland-subsurface.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/src/wayland/meta-wayland-subsurface.c b/src/wayland/meta-wayland-subsurface.c
index ef6f6657bf..4055e68820 100644
--- a/src/wayland/meta-wayland-subsurface.c
+++ b/src/wayland/meta-wayland-subsurface.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]