compositor: Switch to new surface/view mapped checks

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@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Armin Krezović 8 years ago committed by Pekka Paalanen
parent d0cf441134
commit 0da12b8b8d
  1. 29
      libweston/compositor.c

@ -1544,22 +1544,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

Loading…
Cancel
Save