[PATCH weston v2 6/6] compositor: Switch to new surface/view mapped checks
Armin Krezović
krezovic.armin at gmail.com
Thu Jun 30 04:04:33 UTC 2016
This patch makes use of new flags which were introduced
by previous patches to check if a surface/view is mapped
v2:
- Rebased to apply on git master
- Added comments with link to discussion about proposed
changes for weston_{surface,view}_is_mapped()
Signed-off-by: Armin Krezović <krezovic.armin at gmail.com>
---
libweston/compositor.c | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 93371b1..eb9e8d9 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -1543,22 +1543,35 @@ weston_view_set_mask_infinite(struct weston_view *view)
weston_view_schedule_repaint(view);
}
+/* Check if view should be displayed
+ *
+ * The indicator is set manually when assigning
+ * a view to a surface.
+ *
+ * This needs reworking. See the thread starting at:
+ *
+ * https://lists.freedesktop.org/archives/wayland-devel/2016-June/029656.html
+ */
WL_EXPORT bool
weston_view_is_mapped(struct weston_view *view)
{
- if (view->output)
- return true;
- else
- return false;
+ return view->is_mapped;
}
+/* Check if a surface has a view assigned to it
+ *
+ * The indicator is set manually when mapping
+ * a surface and creating a view for it.
+ *
+ * This needs to go. See the thread starting at:
+ *
+ * https://lists.freedesktop.org/archives/wayland-devel/2016-June/029656.html
+ *
+ */
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