[PATCH weston 12/12] compositor: Switch to new surface/view mapped checks

Armin Krezović krezovic.armin at gmail.com
Thu Jun 23 09:59:40 UTC 2016


This patch makes use of new flags which were introduced
by previous patches to check if a surface/view is mapped

Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
---
 src/compositor.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 93371b1..673a4ea 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1546,19 +1546,13 @@ weston_view_set_mask_infinite(struct weston_view *view)
 WL_EXPORT bool
 weston_view_is_mapped(struct weston_view *view)
 {
-	if (view->output)
-		return true;
-	else
-		return false;
+	return view->is_mapped;
 }
 
 WL_EXPORT bool
 weston_surface_is_mapped(struct weston_surface *surface)
 {
-	if (surface->output)
-		return true;
-	else
-		return false;
+	return surface->is_mapped;
 }
 
 static void
-- 
2.9.0



More information about the wayland-devel mailing list